Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTTL = uint32(3600) CleanupInterval = time.Second * 120 CleanupThreshold = 512 )
View Source
const (
APP_ID = app.ID(2)
)
View Source
const (
QueryTimeout = time.Second * 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheServer ¶
func NewCacheServer ¶
func NewCacheServer(space app.Space, config *Config) *CacheServer
func (*CacheServer) Release ¶
func (this *CacheServer) Release()
type Config ¶
type Config struct {
NameServers []v2net.Destination
}
type DomainRecord ¶
type DomainRecord struct {
A *ARecord
}
type LocalNameServer ¶
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶
func (this *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.PacketDispatcher) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶
func (this *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
@Private
func (*UDPNameServer) HandleResponse ¶
func (this *UDPNameServer) HandleResponse(dest v2net.Destination, payload *alloc.Buffer)
@Private
func (*UDPNameServer) QueryA ¶
func (this *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.