diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-20 02:52:59 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-20 02:52:59 +0900 |
commit | b6e606a99480cffd47e73e7b74aa3a10df5ad47d (patch) | |
tree | ad34613d89ea3316271ff6c2f82caff804ff9c81 /server/server.go | |
parent | 49e45d4e0c0a81dc8f9ec4b3a39433b22af04f16 (diff) |
remove gRPC dependency from peer.go
move gRPC dependency from peer.go to grpc_server.go
Preparation for the removal of gRPC dependency from packages except
for api package.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go index 05a1f295..0642619b 100644 --- a/server/server.go +++ b/server/server.go @@ -1682,14 +1682,12 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) { } close(grpcReq.ResponseCh) case REQ_NEIGHBOR: - l := []*api.Peer{} + l := make([]*config.Neighbor, 0) for _, peer := range server.neighborMap { - l = append(l, peer.ToApiStruct()) + l = append(l, peer.ToConfig()) } grpcReq.ResponseCh <- &GrpcResponse{ - Data: &api.GetNeighborResponse{ - Peers: l, - }, + Data: l, } close(grpcReq.ResponseCh) case REQ_ADJ_RIB_IN, REQ_ADJ_RIB_OUT: |