vl3dns

package
v1.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient added in v1.5.0

func NewClient(dnsServerIP net.IP, dnsConfigs *dnsconfig.Map) networkservice.NetworkServiceClient

NewClient - returns a new null client that does nothing but call next.Client(ctx).{Request/Close} and return the result

This is very useful in testing

func NewServer

func NewServer(chanCtx context.Context, getDNSServerIP func() net.IP, opts ...Option) networkservice.NetworkServiceServer

NewServer creates a new vl3dns netwrokservice server. It starts dns server on the passed port/url. By default listens ":53". By default is using fanout dns handler to connect to other vl3 nses. chanCtx is using for signal to stop dns server. opts confugre vl3dns networkservice instance with specific behavior.

Types

type Option

type Option func(*vl3DNSServer)

Option configures vl3DNSServer

func WithConfigs added in v1.5.0

func WithConfigs(m *dnsconfig.Map) Option

WithConfigs sets initial list to fanout queries

func WithDNSListenAndServeFunc

func WithDNSListenAndServeFunc(listenAndServeDNS func(ctx context.Context, handler dnsutils.Handler, listenOn string)) Option

WithDNSListenAndServeFunc replaces default listen and serve behavior for inner dns server

func WithDNSPort

func WithDNSPort(dnsPort int) Option

WithDNSPort replaces default dns port for the inner dns server.

func WithDNSServerHandler

func WithDNSServerHandler(handler dnsutils.Handler) Option

WithDNSServerHandler replaces default dns handler to specific one

func WithDomainSchemes

func WithDomainSchemes(domainSchemes ...string) Option

WithDomainSchemes sets domain schemes for vl3 dns server. Schemes are using to get dns names for clients

Jump to

Keyboard shortcuts

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