Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLookupTimeout ¶
SetLookupTimeout sets the node resolution lookup timeout.
Types ¶
type Resolver ¶
type Resolver interface { Type() string Addr() string GetAddress() (net.Addr, error) IsExhausted() bool }
Resolver is an interface which provides an abstract factory for net.Addr addresses. Resolvers are not thread safe.
func NewResolver ¶
NewResolver takes a resolver specification and returns a new resolver. A specification is of the form: [<network type>=]<address> Network type can be one of:
- tcp: plain hostname or ip address
- unix: unix sockets
- http-lb: http load balancer: queries http(s)://<lb>/_status/details/local for node addresses
If "network type" is not specified, "tcp" is assumed.
func NewResolverFromAddress ¶
NewResolverFromAddress takes a net.Addr and constructs a resolver.
func NewResolverFromUnresolvedAddr ¶
func NewResolverFromUnresolvedAddr(addr util.UnresolvedAddr) (Resolver, error)
NewResolverFromUnresolvedAddr takes a util.UnresolvedAddr and constructs a resolver.
Click to show internal directories.
Click to hide internal directories.