registry/service: pass domain options via rpc (#1719)

* registry/service: regenerate proto

* registry/service: pass domain in proto request options

* registry/service: stop defaulting metadata

* registry: add default domain const; remove from implementations

* registry/memory: fix typo
This commit is contained in:
ben-toogood
2020-06-19 10:34:12 +01:00
committed by GitHub
parent c16f4b741c
commit 58c6bbbf6b
8 changed files with 1073 additions and 1258 deletions

View File

@@ -20,9 +20,7 @@ import (
"github.com/micro/go-micro/v2/util/mdns"
)
var (
// use a .micro tld rather than .local by default
defaultDomain = "micro"
const (
// every service is written to the global domain so * domain queries work, e.g.
// calling mdns.List(registry.ListDomain("*")) will list the services across all
// domains
@@ -149,7 +147,7 @@ func newRegistry(opts ...Option) Registry {
}
// set the domain
defaultDomain := defaultDomain
defaultDomain := DefaultDomain
d, ok := options.Context.Value("mdns.domain").(string)
if ok {