summaryrefslogtreecommitdiffhomepage
path: root/server/grpc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r--server/grpc_server.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index b56e2e14..ee8e5de1 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -83,6 +83,7 @@ const (
REQ_MRT_GLOBAL_RIB
REQ_MRT_LOCAL_RIB
REQ_RPKI
+ REQ_ROA
REQ_VRF
REQ_VRFS
REQ_VRF_MOD
@@ -513,6 +514,15 @@ func (s *Server) GetRPKI(arg *api.Arguments, stream api.Grpc_GetRPKIServer) erro
s.bgpServerCh <- req
return handleMultipleResponses(req, func(res *GrpcResponse) error {
+ return stream.Send(res.Data.(*api.RPKI))
+ })
+}
+
+func (s *Server) GetROA(arg *api.Arguments, stream api.Grpc_GetROAServer) error {
+ req := NewGrpcRequest(REQ_ROA, arg.Name, bgp.RouteFamily(arg.Rf), nil)
+ s.bgpServerCh <- req
+
+ return handleMultipleResponses(req, func(res *GrpcResponse) error {
return stream.Send(res.Data.(*api.ROA))
})
}