summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pkg/server/grpc_server.go6
-rw-r--r--pkg/server/server.go4
2 files changed, 5 insertions, 5 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go
index 9f6b5bbb..eb17c69f 100644
--- a/pkg/server/grpc_server.go
+++ b/pkg/server/grpc_server.go
@@ -300,7 +300,7 @@ func (s *Server) SetPolicies(ctx context.Context, r *api.SetPoliciesRequest) (*e
func NewRoutingPolicyFromApiStruct(arg *api.SetPoliciesRequest) (*config.RoutingPolicy, error) {
policyDefinitions := make([]config.PolicyDefinition, 0, len(arg.Policies))
for _, p := range arg.Policies {
- pd, err := NewConfigPolicyFromApiStruct(p)
+ pd, err := newConfigPolicyFromApiStruct(p)
if err != nil {
return nil, err
}
@@ -1625,7 +1625,7 @@ func (s *Server) DeleteStatement(ctx context.Context, r *api.DeleteStatementRequ
return &empty.Empty{}, s.bgpServer.DeleteStatement(ctx, r)
}
-func NewConfigPolicyFromApiStruct(a *api.Policy) (*config.PolicyDefinition, error) {
+func newConfigPolicyFromApiStruct(a *api.Policy) (*config.PolicyDefinition, error) {
if a.Name == "" {
return nil, fmt.Errorf("empty policy name")
}
@@ -1647,7 +1647,7 @@ func NewConfigPolicyFromApiStruct(a *api.Policy) (*config.PolicyDefinition, erro
}, nil
}
-func NewPolicyFromApiStruct(a *api.Policy) (*table.Policy, error) {
+func newPolicyFromApiStruct(a *api.Policy) (*table.Policy, error) {
if a.Name == "" {
return nil, fmt.Errorf("empty policy name")
}
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 379daa67..d250b099 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -3097,7 +3097,7 @@ func (s *BgpServer) AddPolicy(ctx context.Context, r *api.AddPolicyRequest) erro
if r == nil || r.Policy == nil {
return fmt.Errorf("invalid request")
}
- p, err := NewPolicyFromApiStruct(r.Policy)
+ p, err := newPolicyFromApiStruct(r.Policy)
if err == nil {
err = s.policy.AddPolicy(p, r.ReferExistingStatements)
}
@@ -3110,7 +3110,7 @@ func (s *BgpServer) DeletePolicy(ctx context.Context, r *api.DeletePolicyRequest
if r == nil || r.Policy == nil {
return fmt.Errorf("invalid request")
}
- p, err := NewPolicyFromApiStruct(r.Policy)
+ p, err := newPolicyFromApiStruct(r.Policy)
if err != nil {
return err
}