Use .micro domain for mdns
This commit is contained in:
parent
d1d6608f90
commit
de2c6073b7
12
mdns.go
12
mdns.go
@ -2,6 +2,8 @@
|
|||||||
package mdns
|
package mdns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -9,3 +11,13 @@ import (
|
|||||||
func NewRegistry(opts ...registry.Option) registry.Registry {
|
func NewRegistry(opts ...registry.Option) registry.Registry {
|
||||||
return registry.NewRegistry(opts...)
|
return registry.NewRegistry(opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Domain sets the mdnsDomain
|
||||||
|
func Domain(d string) registry.Option {
|
||||||
|
return func(o *registry.Options) {
|
||||||
|
if o.Context == nil {
|
||||||
|
o.Context = context.Background()
|
||||||
|
}
|
||||||
|
o.Context = context.WithValue(o.Context, "mdns.domain", d)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user