Documentation ¶
Overview ¶
Package dnssrv provides a subscriber implementation for DNS SRV records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lookup ¶
Lookup is a function that resolves a DNS SRV record to multiple addresses. It has the same signature as net.LookupSRV.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber yields endpoints taken from the named DNS SRV record. The name is resolved on a fixed schedule. Priorities and weights are ignored.
func NewSubscriber ¶
func NewSubscriber( name string, ttl time.Duration, factory sd.Factory, logger log.Logger, ) *Subscriber
NewSubscriber returns a DNS SRV subscriber.
func NewSubscriberDetailed ¶
func NewSubscriberDetailed( name string, refresh *time.Ticker, lookup Lookup, factory sd.Factory, logger log.Logger, ) *Subscriber
NewSubscriberDetailed is the same as NewSubscriber, but allows users to provide an explicit lookup refresh ticker instead of a TTL, and specify the lookup function instead of using net.LookupSRV.
Click to show internal directories.
Click to hide internal directories.