Documentation
¶
Overview ¶
Package mdns defines the mdns discovery provider
Index ¶
- Constants
- type Discovery
- func (d *Discovery) Close() error
- func (d *Discovery) Deregister() error
- func (d *Discovery) DiscoverNodes() ([]*discovery.Node, error)
- func (d *Discovery) ID() string
- func (d *Discovery) Initialize() error
- func (d *Discovery) Register() error
- func (d *Discovery) SetConfig(config discovery.Options) error
- func (d *Discovery) Watch(ctx context.Context) (<-chan discovery.Event, error)
- type Option
Constants ¶
View Source
const ( ServiceName = "name" Service = "service" Domain = "domain" Port = "group-port" IPv6 = "ipv6" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery defines the mDNS discovery provider
func NewDiscovery ¶
func NewDiscovery() *Discovery
NewDiscovery returns an instance of the mDNS discovery provider
func (*Discovery) Deregister ¶
Deregister removes this node from a service discovery directory.
func (*Discovery) DiscoverNodes ¶
DiscoverNodes returns a list of known nodes.
func (*Discovery) Initialize ¶
Initialize the discovery provider
type Option ¶
type Option struct { // Provider specifies the provider name Provider string // Service specifies the service name ServiceName string // Service specifies the service type Service string // Specifies the service domain Domain string // Port specifies the port the service is listening to Port int // IPv6 states whether to fetch ipv6 address instead of ipv4 IPv6 *bool }
Option represents the mDNS provider option
Click to show internal directories.
Click to hide internal directories.