add client address option, fix noop resolver

This commit is contained in:
2021-11-22 14:04:47 +01:00
parent c6557d12f2
commit e8f0a2f03d
5 changed files with 28 additions and 20 deletions

View File

@ -36,6 +36,12 @@ func WithVersion(version string) Option {
}
}
func WithAddress(address string) Option {
return func(o *options) {
o.addr = address
}
}
func WithTLSConfig(conf *tls.Config) Option {
return func(o *options) {
o.tlsConfig = conf
@ -58,6 +64,7 @@ type options struct {
registry registry.Registry
name string
version string
addr string
tlsConfig *tls.Config
secure bool
dialOptions []grpc.DialOption