Merge pull request #1638 from micro/registry-addrs-fix

Fix registry address option unused
This commit is contained in:
ben-toogood 2020-05-14 18:07:14 +01:00 committed by GitHub
commit ef43f01da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,10 @@ func (s *serviceRegistry) Init(opts ...registry.Option) error {
o(&s.opts)
}
if len(s.opts.Addrs) > 0 {
s.address = s.opts.Addrs
}
// extract the client from the context, fallback to grpc
var cli client.Client
if c, ok := s.opts.Context.Value(clientKey{}).(client.Client); ok {