resolver

package
v0.0.0-...-9910822 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

func NewResolver

func NewResolver(context *base.Context, spec string) (Resolver, error)

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 of ip address
  • lb: load balancer host name or ip: points to an unknown number of backends
  • 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

func NewResolverFromAddress(addr net.Addr) Resolver

NewResolverFromAddress takes a net.Addr and contructs a resolver.

Jump to

Keyboard shortcuts

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