Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSRVRecord ¶
ParseSRVRecord returns the different elements of SRV records by parsing rec string.
Types ¶
type SRVResolver ¶
type SRVResolver struct {
// contains filtered or unexported fields
}
SRVResolver performs SRV resolution and optionally runs those in background sending periodical updates.
func NewSRVResolver ¶
func NewSRVResolver( service string, proto string, name string, resolveInterval time.Duration, logger log.Logger, ) *SRVResolver
NewSRVResolver creates and initializes a new SRVResolver instance.
func (*SRVResolver) Resolve ¶
func (r *SRVResolver) Resolve(ctx context.Context) error
Resolve performs SRV resolution and starts running background updates.
func (*SRVResolver) Targets ¶
func (r *SRVResolver) Targets() []string
Targets returns last resolved SRV targets.
func (*SRVResolver) Update ¶
func (r *SRVResolver) Update() <-chan SRVUpdate
Update returns the SRV record updates channel.
Click to show internal directories.
Click to hide internal directories.