diff options
-rw-r--r-- | api/grpc_server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index a850100c..3ddc43b2 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -180,7 +180,7 @@ func (s *Server) GetNeighbor(ctx context.Context, arg *GetNeighborRequest) (*Get return &GetNeighborResponse{Peers: p}, nil } -func toPathApi(path *table.Path) *Path { +func ToPathApi(path *table.Path) *Path { nlri := path.GetNlri() n, _ := nlri.Serialize() family := uint32(bgp.AfiSafiToRouteFamily(nlri.AFI(), nlri.SAFI())) @@ -257,7 +257,7 @@ func (s *Server) GetRib(ctx context.Context, arg *GetRibRequest) (*GetRibRespons Paths: func(paths []*table.Path) []*Path { l := make([]*Path, 0, len(paths)) for i, p := range paths { - pp := toPathApi(p) + pp := ToPathApi(p) switch arg.Table.Type { case Resource_LOCAL, Resource_GLOBAL: if i == 0 { @@ -306,11 +306,11 @@ func (s *Server) MonitorRib(arg *Table, stream GobgpApi_MonitorRibServer) error continue } if dst, y := dsts[path.GetNlri().String()]; y { - dst.Paths = append(dst.Paths, toPathApi(path)) + dst.Paths = append(dst.Paths, ToPathApi(path)) } else { dsts[path.GetNlri().String()] = &Destination{ Prefix: path.GetNlri().String(), - Paths: []*Path{toPathApi(path)}, + Paths: []*Path{ToPathApi(path)}, } } } |