resolver

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPSyncer

type IPSyncer interface {
	PrepareAnswers(domain string, ips []net.IP) error
	SyncFromAnswers(domain string, ips []net.IP) error
}

type QueryStats

type QueryStats struct {
	Total     int64
	CacheHits int64
	Custom    int64
	DoH       int64
	Servfail  int64
	Refused   int64
	NXDomain  int64
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg conf.ServerConfig, ipManager IPSyncer, resolver *Upstream) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) SetNotifyStartedFunc

func (s *Server) SetNotifyStartedFunc(fn func())

func (*Server) Stats

func (s *Server) Stats() QueryStats

type ServerStat

type ServerStat struct {
	Server      string
	Successes   uint64
	Failures    uint64
	LastLatency time.Duration
}

type Upstream

type Upstream struct {
	// contains filtered or unexported fields
}

func NewUpstream

func NewUpstream(cfg conf.UpstreamConfig) *Upstream

func (*Upstream) Close

func (r *Upstream) Close()

func (*Upstream) ForwardQuery

func (r *Upstream) ForwardQuery(query []byte) ([]byte, error)

func (*Upstream) ServerStats

func (r *Upstream) ServerStats() []ServerStat

Jump to

Keyboard shortcuts

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