cockroach: github.com/cockroachdb/cockroach/pkg/gossip/resolver Index | Files

package resolver

import "github.com/cockroachdb/cockroach/pkg/gossip/resolver"

Index

Package Files

resolver.go socket.go

func SRV Uses

func SRV(ctx context.Context, name string) ([]string, error)

SRV returns a slice of addresses from SRV record lookup

func TestingOverrideSRVLookupFn Uses

func TestingOverrideSRVLookupFn(
    fn func(service, proto, name string) (cname string, addrs []*net.SRV, err error),
) func()

TestingOverrideSRVLookupFn enables a test to temporarily override the SRV lookup function.

type Resolver Uses

type Resolver interface {
    Type() string
    Addr() string
    GetAddress() (net.Addr, error)
}

Resolver is an interface which provides an abstract factory for net.Addr addresses. Resolvers are not thread safe.

func NewResolver Uses

func NewResolver(address string) (Resolver, error)

NewResolver takes an address and returns a new resolver.

func NewResolverFromAddress Uses

func NewResolverFromAddress(addr net.Addr) (Resolver, error)

NewResolverFromAddress takes a net.Addr and constructs a resolver.

func NewResolverFromUnresolvedAddr Uses

func NewResolverFromUnresolvedAddr(addr util.UnresolvedAddr) (Resolver, error)

NewResolverFromUnresolvedAddr takes a util.UnresolvedAddr and constructs a resolver.

Package resolver imports 9 packages (graph) and is imported by 120 packages. Updated 2020-06-24. Refresh now. Tools for package owners.