2020-07-27 15:22:00 +03:00
|
|
|
// Package mdns provides a multicast dns registry
|
|
|
|
package mdns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-02-19 23:12:48 +03:00
|
|
|
"github.com/unistack-org/micro/v3/register"
|
2020-07-27 15:22:00 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
// Domain sets the mdnsDomain
|
2021-02-19 23:12:48 +03:00
|
|
|
func Domain(d string) register.Option {
|
|
|
|
return func(o *register.Options) {
|
2020-07-27 15:22:00 +03:00
|
|
|
if o.Context == nil {
|
|
|
|
o.Context = context.Background()
|
|
|
|
}
|
|
|
|
o.Context = context.WithValue(o.Context, "mdns.domain", d)
|
|
|
|
}
|
|
|
|
}
|