Documentation ¶
Overview ¶
Package dnssrv defines some implementations for a dns based service discovery
Index ¶
Examples ¶
Constants ¶
View Source
const Namespace = "dns"
Namespace is the key for the dns sd module
Variables ¶
View Source
var DefaultLookup = net.LookupSRV
DefaultLookup is the function used for the DNS resolution
View Source
var TTL = 30 * time.Second
TTL is the duration of the cached data
Functions ¶
func NewDetailed ¶
func NewDetailed(name string, lookup lookup, ttl time.Duration) sd.Subscriber
NewDetailed creates a DNS subscriber with the received values
Example ¶
Output: http://127.0.0.1:81 http://127.0.0.1:81 http://127.0.0.1:80 http://127.0.0.1:90 http://foobar:90
func Register ¶
func Register() error
Register registers the dns sd subscriber factory under the name defined by Namespace
Example ¶
Output: http://127.0.0.1:81 http://127.0.0.1:81 http://127.0.0.1:80 http://127.0.0.1:90 http://foobar:90
func SubscriberFactory ¶
func SubscriberFactory(cfg *config.Backend) sd.Subscriber
SubscriberFactory builds a DNS_SRV Subscriber with the received config
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.