Documentation ¶
Overview ¶
Package dnscontext provides a dns context specific chain element. It just adds dns configs into dns context of connection context. It also provides a possibility to use custom dns configs getters for setup users endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(options ...DNSOption) networkservice.NetworkServiceClient
NewClient creates a new DNS client chain component. Setups all DNS traffic to the localhost. Monitors DNS configs from connections.
func NewServer ¶
func NewServer(configs ...*networkservice.DNSConfig) networkservice.NetworkServiceServer
NewServer creates dns context chain server element.
Types ¶
type DNSOption ¶
type DNSOption interface {
// contains filtered or unexported methods
}
DNSOption is applying options for DNS client.
func WithChainContext ¶
WithChainContext sets chain context for DNS server.
func WithCorefilePath ¶
WithCorefilePath sets specific corefile path for DNS client.
func WithDefaultNameServerIP ¶
WithDefaultNameServerIP sets specific IP address of default DNS server.
func WithResolveConfigPath ¶
WithResolveConfigPath sets specific resolve config file path for DNS client.
type GetDNSConfigsFunc ¶
type GetDNSConfigsFunc func() []*networkservice.DNSConfig
GetDNSConfigsFunc gets dns configs