Documentation ¶
Index ¶
- Constants
- type ARecord
- type CacheServer
- type DomainRecord
- type LocalNameServer
- type NameServer
- type PendingRequest
- type UDPNameServer
- func (v *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
- func (v *UDPNameServer) BuildQueryA(domain string, id uint16) *buf.Buffer
- func (v *UDPNameServer) Cleanup()
- func (v *UDPNameServer) HandleResponse(payload *buf.Buffer)
- func (v *UDPNameServer) QueryA(domain string) <-chan *ARecord
Constants ¶
View Source
const ( DefaultTTL = uint32(3600) CleanupInterval = time.Second * 120 CleanupThreshold = 512 )
View Source
const (
QueryTimeout = time.Second * 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheServer ¶
func NewCacheServer ¶
func (CacheServer) Close ¶
func (CacheServer) Close()
func (*CacheServer) GetCached ¶
func (v *CacheServer) GetCached(domain string) []net.IP
Private: Visible for testing.
func (CacheServer) Interface ¶
func (CacheServer) Interface() interface{}
func (CacheServer) Start ¶
func (CacheServer) Start() error
type DomainRecord ¶
type DomainRecord struct {
A *ARecord
}
type LocalNameServer ¶
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶
func (v *LocalNameServer) QueryA(domain string) <-chan *ARecord
type NameServer ¶
type PendingRequest ¶
type PendingRequest struct {
// contains filtered or unexported fields
}
type UDPNameServer ¶
func NewUDPNameServer ¶
func NewUDPNameServer(address v2net.Destination, dispatcher dispatcher.Interface) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶
func (v *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
Private: Visible for testing.
func (*UDPNameServer) BuildQueryA ¶
func (v *UDPNameServer) BuildQueryA(domain string, id uint16) *buf.Buffer
func (*UDPNameServer) HandleResponse ¶
func (v *UDPNameServer) HandleResponse(payload *buf.Buffer)
Private: Visible for testing.
func (*UDPNameServer) QueryA ¶
func (v *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.