Documentation ¶
Overview ¶
Package dns is an implementation of core.DNS feature.
Index ¶
- Constants
- type ARecord
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetHosts() map[string]*net.IPOrDomain
- func (c *Config) GetInternalHosts() map[string]net.IP
- func (m *Config) GetNameServers() []*net.Endpoint
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type DomainRecord
- type LocalNameServer
- type NameServer
- type PendingRequest
- type Server
- type UDPNameServer
Constants ¶
View Source
const (
QueryTimeout = time.Second * 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Nameservers used by this DNS. Only traditional UDP servers are support at the moment. // A special value 'localhost' as a domain address can be set to use DNS on local system. NameServers []*net.Endpoint `protobuf:"bytes,1,rep,name=NameServers" json:"NameServers,omitempty"` // Static hosts. Domain to IP. Hosts map[string]*net.IPOrDomain `` /* 130-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) GetNameServers ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type DomainRecord ¶ added in v1.13.1
func (*DomainRecord) Expired ¶
func (r *DomainRecord) Expired() bool
type LocalNameServer ¶ added in v1.13.1
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶ added in v1.13.1
func (*LocalNameServer) QueryA(domain string) <-chan *ARecord
type NameServer ¶
type PendingRequest ¶ added in v1.13.1
type PendingRequest struct {
// contains filtered or unexported fields
}
type UDPNameServer ¶ added in v1.13.1
func NewUDPNameServer ¶ added in v1.13.1
func NewUDPNameServer(address net.Destination, dispatcher core.Dispatcher) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶ added in v1.13.1
func (s *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
func (*UDPNameServer) Cleanup ¶ added in v1.13.1
func (s *UDPNameServer) Cleanup() error
func (*UDPNameServer) HandleResponse ¶ added in v1.13.1
func (s *UDPNameServer) HandleResponse(payload *buf.Buffer)
func (*UDPNameServer) QueryA ¶ added in v1.13.1
func (s *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.