Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrListeningAddressNotValid = errors.New("listening address is not valid")
)
View Source
var (
ErrServerNotRunning = errors.New("server not running")
)
View Source
var (
ErrUpstreamResolversNotSet = errors.New("upstream resolvers not set")
)
Functions ¶
func NewResolver ¶
func NewResolver(settings ResolverSettings) ( resolver *net.Resolver, err error)
NewResolver creates a DNS over TLS resolver.
Types ¶
type Middleware ¶
type ResolverSettings ¶
type ResolverSettings struct { // UpstreamResolvers is a list of DNS over TLS upstream resolvers // to use. UpstreamResolvers []provider.Provider // Timeout is the maximum duration to wait for a response from // upstream DNS over TLS servers. If left unset, it defaults to // 5 seconds. Timeout time.Duration // IPVersion defines the only IP version to use to connect to // upstream DNS over TLS servers. If left unset, it defaults to // "ipv4". IPVersion string // Warner is the warning logger to log dial errors. // It defaults to a No-Op warner implementation. Warner Warner // Metrics is the metrics interface to record metric data. // It defaults to a No-Op metrics implementation. Metrics Metrics }
func (*ResolverSettings) SetDefaults ¶
func (s *ResolverSettings) SetDefaults()
func (*ResolverSettings) String ¶
func (s *ResolverSettings) String() string
func (*ResolverSettings) ToLinesNode ¶
func (s *ResolverSettings) ToLinesNode() (node *gotree.Node)
func (ResolverSettings) Validate ¶
func (s ResolverSettings) Validate() (err error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(settings ServerSettings) (server *Server, err error)
type ServerSettings ¶
type ServerSettings struct { Resolver ResolverSettings ListeningAddress *string // Middlewares is a list of middlewares to use. // The first one is the first wrapper, and the last one // is the last wrapper of the handlers in the chain. Middlewares []Middleware // Logger is the logger to log information. // It defaults to a No-Op logger implementation. Logger Logger }
func (*ServerSettings) SetDefaults ¶
func (s *ServerSettings) SetDefaults()
func (*ServerSettings) String ¶
func (s *ServerSettings) String() string
func (*ServerSettings) ToLinesNode ¶
func (s *ServerSettings) ToLinesNode() (node *gotree.Node)
func (ServerSettings) Validate ¶
func (s ServerSettings) Validate() (err error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
metrics
|
|
noop
Package noop defines a No-Op metric implementation for DoT.
|
Package noop defines a No-Op metric implementation for DoT. |
prometheus
Package prometheus defines a Prometheus metric implementation for DoT.
|
Package prometheus defines a Prometheus metric implementation for DoT. |
Click to show internal directories.
Click to hide internal directories.