Documentation ¶
Index ¶
- func DnsQuery(server string, query *dns.Msg) (*dns.Msg, time.Duration, error)
- func RandUint16() (uint16, error)
- type StubResolver
- func (resolver *StubResolver) AsyncQuery(qname string, rtype uint16) (handle int)
- func (resolver *StubResolver) Close()
- func (resolver *StubResolver) SyncQuery(qname string, rtype uint16) (*dns.Msg, time.Duration, error)
- func (resolver *StubResolver) Wait() (*dns.Msg, time.Duration, string, uint16, error)
- func (resolver *StubResolver) WaitByHandle(handle int) (*dns.Msg, time.Duration, string, uint16, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandUint16 ¶
Types ¶
type StubResolver ¶
type StubResolver struct {
// contains filtered or unexported fields
}
func (*StubResolver) AsyncQuery ¶
func (resolver *StubResolver) AsyncQuery(qname string, rtype uint16) (handle int)
func (*StubResolver) Close ¶
func (resolver *StubResolver) Close()
func (*StubResolver) WaitByHandle ¶
func (resolver *StubResolver) WaitByHandle(handle int) (*dns.Msg, time.Duration, string, uint16, error)
Wait for a specific handle. Note that mixing Wait() and WaitByHandle() is dangerous because a Wait() may read a result before the WaitByHandle() gets it, so it may wait forever.
Click to show internal directories.
Click to hide internal directories.