dnssrv

package
v0.0.0-...-6aeb139 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher yields endpoints taken from the named DNS SRV record. The name is resolved on a fixed schedule. Priorities and weights are ignored.

func NewPublisher

func NewPublisher(name string, ttl time.Duration, f loadbalancer.Factory, logger log.Logger) (*Publisher, error)

NewPublisher returns a DNS SRV publisher. The name is resolved synchronously as part of construction; if that resolution fails, the constructor will return an error. The factory is used to convert a host:port to a usable endpoint. The logger is used to report DNS and factory errors.

func (*Publisher) Endpoints

func (p *Publisher) Endpoints() ([]endpoint.Endpoint, error)

Endpoints implements the Publisher interface.

func (*Publisher) Stop

func (p *Publisher) Stop()

Stop terminates the publisher.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL