dnscontext

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 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 client.

func WithDNSConfigsMap added in v1.5.0

func WithDNSConfigsMap(configsMap *genericsync.Map[string, []*networkservice.DNSConfig]) DNSOption

WithDNSConfigsMap sets configs map for DNS client.

func WithDefaultNameServerIP

func WithDefaultNameServerIP(ip string) DNSOption

WithDefaultNameServerIP sets default nameserver ip for resolvConfigHandler.

func WithResolveConfigPath

func WithResolveConfigPath(path string) DNSOption

WithResolveConfigPath sets resolv.conf path for resonvConfigHandler.

type GetDNSConfigsFunc

type GetDNSConfigsFunc func() []*networkservice.DNSConfig

GetDNSConfigsFunc gets dns configs

Directories

Path Synopsis
Package vl3dns provides a possible for vl3 networkservice endpoint to use distributed dns
Package vl3dns provides a possible for vl3 networkservice endpoint to use distributed dns

Jump to

Keyboard shortcuts

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