summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/grpc_server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-28 20:50:51 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-28 21:45:41 +0900
commitf1c55ca0bf844c500a5516ddcd34feb78aed833a (patch)
treed5966092c04068e655e4b4ec54aca3e4aea287a2 /pkg/server/grpc_server.go
parent3e950780fedccacdd1e1267343b5b9baae204566 (diff)
server: make NewPolicyFromApiStruct() unexported
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg/server/grpc_server.go')
-rw-r--r--pkg/server/grpc_server.go6
1 files changed, 3 insertions, 3 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")
}