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
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 ¶
WithDNSPort replaces default dns port for the inner dns server.
func WithDNSServerHandler ¶
WithDNSServerHandler replaces default dns handler to specific one
func WithDomainSchemes ¶
WithDomainSchemes sets domain schemes for vl3 dns server. Schemes are using to get dns names for clients