Documentation ¶
Overview ¶
Package dnsresolve provides registry chain elements that can resolve passed Domain to URL
Index ¶
- Constants
- func NewNetworkServiceEndpointRegistryClient(opts ...Option) registry.NetworkServiceEndpointRegistryClient
- func NewNetworkServiceEndpointRegistryServer(opts ...Option) registry.NetworkServiceEndpointRegistryServer
- func NewNetworkServiceRegistryClient(opts ...Option) registry.NetworkServiceRegistryClient
- func NewNetworkServiceRegistryServer(opts ...Option) registry.NetworkServiceRegistryServer
- type Option
- type Resolver
Constants ¶
const DefaultNsmgrProxyService = "nsmgr-proxy.nsm-system"
DefaultNsmgrProxyService default NSM nsmgr proxy service name for SRV lookup
const DefaultRegistryService = "registry.nsm-system"
DefaultRegistryService default NSM registry service name for SRV lookup
Variables ¶
This section is empty.
Functions ¶
func NewNetworkServiceEndpointRegistryClient ¶ added in v1.4.0
func NewNetworkServiceEndpointRegistryClient(opts ...Option) registry.NetworkServiceEndpointRegistryClient
NewNetworkServiceEndpointRegistryClient creates new NetworkServiceEndpointRegistryClient that can resolve passed domain to clienturl
func NewNetworkServiceEndpointRegistryServer ¶
func NewNetworkServiceEndpointRegistryServer(opts ...Option) registry.NetworkServiceEndpointRegistryServer
NewNetworkServiceEndpointRegistryServer creates new NetworkServiceRegistryServer that can resolve passed domain to clienturl
func NewNetworkServiceRegistryClient ¶ added in v1.4.0
func NewNetworkServiceRegistryClient(opts ...Option) registry.NetworkServiceRegistryClient
NewNetworkServiceRegistryClient creates new NetworkServiceRegistryClient that can resolve passed domain to clienturl
func NewNetworkServiceRegistryServer ¶
func NewNetworkServiceRegistryServer(opts ...Option) registry.NetworkServiceRegistryServer
NewNetworkServiceRegistryServer creates new NetworkServiceRegistryServer that can resolve passed domain to clienturl
Types ¶
type Option ¶
type Option func(*options)
Option is option to configure dnsresovle chain elements
func WithNSMgrProxyService ¶
WithNSMgrProxyService sets default service of nsmgr-proxy to lookup DNS SRV records
func WithRegistryService ¶
WithRegistryService sets default service of nsmgr-proxy to lookup DNS SRV records
func WithResolver ¶
WithResolver sets DNS resolver by default used net.DefaultResolver
type Resolver ¶
type Resolver interface { // LookupSRV tries to resolve an SRV query of the given service, // protocol, and domain name. The proto is "tcp" or "udp". // The returned records are sorted by priority and randomized // by weight within a priority. LookupSRV(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) // LookupIPAddr looks up host using the local resolver. // It returns a slice of that host's IPv4 and IPv6 addresses. LookupIPAddr(ctx context.Context, host string) ([]net.IPAddr, error) }
Resolver is DNS resolver