dnscontext

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 12 Imported by: 4

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

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

func WithChainContext(ctx context.Context) DNSOption

WithChainContext sets chain context for DNS server.

func WithCorefilePath

func WithCorefilePath(path string) DNSOption

WithCorefilePath sets specific corefile path for DNS client.

func WithDefaultNameServerIP

func WithDefaultNameServerIP(ip net.IP) DNSOption

WithDefaultNameServerIP sets specific IP address of default DNS server.

func WithResolveConfigPath

func WithResolveConfigPath(path string) DNSOption

WithResolveConfigPath sets specific resolve config file path for DNS client.

type GetDNSConfigsFunc

type GetDNSConfigsFunc func() []*networkservice.DNSConfig

GetDNSConfigsFunc gets dns configs

Jump to

Keyboard shortcuts

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