Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: nsmgr WithrRgistry option has useless registry dial options #1218

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/networkservice/chains/nsmgr/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ type serverOptions struct {
dialOptions []grpc.DialOption
dialTimeout time.Duration
regURL *url.URL
regDialOptions []grpc.DialOption
name string
url string
forwarderServiceName string
Expand Down Expand Up @@ -120,10 +119,9 @@ func WithAuthorizeServer(authorizeServer networkservice.NetworkServiceServer) Op
}

// WithRegistry sets URL and dial options to reach the upstream registry, if not passed memory storage will be used.
func WithRegistry(regURL *url.URL, regDialOptions ...grpc.DialOption) Option {
func WithRegistry(regURL *url.URL) Option {
return func(o *serverOptions) {
o.regURL = regURL
o.regDialOptions = regDialOptions
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/tools/sandbox/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (n *Node) NewNSMgr(
}

if n.domain.Registry != nil {
options = append(options, nsmgr.WithRegistry(CloneURL(n.domain.Registry.URL), dialOptions...))
options = append(options, nsmgr.WithRegistry(CloneURL(n.domain.Registry.URL)))
}

if serveURL.Scheme != "unix" {
Expand Down