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.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index 348d11c7..c475f232 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -28,6 +28,8 @@ import (
const (
_ = iota
+ REQ_GLOBAL_CONFIG
+ REQ_MOD_GLOBAL_CONFIG
REQ_NEIGHBOR
REQ_NEIGHBORS
REQ_ADJ_RIB_IN
@@ -385,6 +387,18 @@ func (s *Server) ModPolicyAssignment(ctx context.Context, arg *api.ModPolicyAssi
return s.mod(REQ_MOD_POLICY_ASSIGNMENT, arg)
}
+func (s *Server) GetGlobalConfig(ctx context.Context, arg *api.Arguments) (*api.Global, error) {
+ d, err := s.get(REQ_GLOBAL_CONFIG, arg)
+ if err != nil {
+ return nil, err
+ }
+ return d.(*api.Global), nil
+}
+
+func (s *Server) ModGlobalConfig(ctx context.Context, arg *api.ModGlobalConfigArguments) (*api.Error, error) {
+ return s.mod(REQ_MOD_GLOBAL_CONFIG, arg)
+}
+
type GrpcRequest struct {
RequestType int
Name string