resolver

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCPlugin

func NewGRPCPlugin(name string, addr string, opts ...plugin.Option) (resolver.IResolver, error)

NewGRPCPlugin creates a Resolver plugin based on gRPC.

func NewHTTPPlugin

func NewHTTPPlugin(name string, url string, opts ...plugin.Option) resolver.IResolver

NewHTTPPlugin creates an Resolver plugin based on HTTP.

func NewResolver

func NewResolver(nameservers []NameServer, opts ...Option) (resolver.IResolver, error)

Types

type NameServer

type NameServer struct {
	Addr     string
	Chain    chain.IChainer
	TTL      time.Duration
	Timeout  time.Duration
	ClientIP net.IP
	Prefer   string
	Hostname string // for TLS handshake verification
	Async    bool
	Only     string
	// contains filtered or unexported fields
}

type Option

type Option func(opts *options)

func DomainOption

func DomainOption(domain string) Option

func LoggerOption

func LoggerOption(logger logger.ILogger) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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