Documentation
¶
Index ¶
- type Handler
- type Server
- func (s *Server) GetRecordStore() *remote.RecordStore
- func (s *Server) Resolve(ctx context.Context, domain string, qtype uint16) ([]net.IP, error)
- func (s *Server) ResolveWithSource(ctx context.Context, domain string, qtype uint16, sourceIP net.IP) ([]net.IP, error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- type UpstreamCache
- func (c *UpstreamCache) Clear()
- func (c *UpstreamCache) Count() int
- func (c *UpstreamCache) Delete(domain string, qtype uint16)
- func (c *UpstreamCache) Get(domain string, qtype uint16) ([]net.IP, bool)
- func (c *UpstreamCache) Set(domain string, qtype uint16, ips []net.IP, ttl time.Duration)
- func (c *UpstreamCache) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server 表示DNS服务器
func (*Server) GetRecordStore ¶
func (s *Server) GetRecordStore() *remote.RecordStore
GetRecordStore 获取记录存储
type UpstreamCache ¶
type UpstreamCache struct {
// contains filtered or unexported fields
}
UpstreamCache 上游DNS查询缓存(独立于记录表)
func NewUpstreamCache ¶
func NewUpstreamCache(maxSize int, defaultTTL time.Duration) *UpstreamCache
NewUpstreamCache 创建上游缓存
func (*UpstreamCache) Delete ¶
func (c *UpstreamCache) Delete(domain string, qtype uint16)
Delete 删除缓存
Click to show internal directories.
Click to hide internal directories.