Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFormat = errors.New("Format Error") ErrServFail = errors.New("Server Failure") ErrNXDomain = errors.New("Non-Existent Domain") ErrNotImp = errors.New("Not Implemented") ErrRefused = errors.New("Query Refused") )
RFC 1035 error interpretation
Functions ¶
func ErrorToRFC1035Status ¶ added in v0.0.49
ErrorToRFC1035Status mapping of RFC1035 errors.
func RFC1035StatusToError ¶ added in v0.0.49
Types ¶
type ForwardLookup ¶
type ForwardLookup interface {
ResolveName(ctx context.Context, protocol, network, domainName string) ([]byte, error)
}
ForwardLookup resolve a name and return address.
type Lookup ¶
type Lookup interface { ForwardLookup ReverseLookup }
Lookup methods for address and domain resolution.
func NewLookupService ¶
NewLookupService creates a new lookup services.
type LookupService ¶
type LookupService struct {
// contains filtered or unexported fields
}
LookupService is the default lookup service.
func (LookupService) ResolveAddress ¶
func (s LookupService) ResolveAddress(ctx context.Context, protocol, network string, address []byte) (string, error)
ResolveAddress looks up an address on the related protocol and network pair.
func (LookupService) ResolveName ¶
func (s LookupService) ResolveName(ctx context.Context, protocol, network, domainName string) ([]byte, error)
ResolveName look up a domain name and return address on the related protocol and network pair.
Directories ¶
Path | Synopsis |
---|---|
Package nameservicetest is a generated GoMock package.
|
Package nameservicetest is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.