2020-07-27 15:22:00 +03:00
|
|
|
// Package mdns provides a multicast dns registry
|
|
|
|
package mdns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2020-08-19 17:47:17 +03:00
|
|
|
"github.com/unistack-org/micro/v3/registry"
|
2020-07-27 15:22:00 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|
|
|
|
}
|