docs for the RR interface
This commit is contained in:
parent
ef709d6e77
commit
76c087f5ba
11
dns.go
11
dns.go
|
@ -103,17 +103,22 @@ func (e *Error) Error() string {
|
|||
|
||||
}
|
||||
|
||||
// An RR represents a resource record.
|
||||
type RR interface {
|
||||
// Header returns the header of an resource record. The header contains
|
||||
// everything up to the rdata.
|
||||
Header() *RR_Header
|
||||
// String returns the text representation of the resource record.
|
||||
String() string
|
||||
// Len returns the length (in octects) of the uncompressed RR in wire format.
|
||||
Len() int
|
||||
}
|
||||
|
||||
// Exchange is used in communicating with the resolver.
|
||||
type Exchange struct {
|
||||
Request *Msg // The question sent.
|
||||
Reply *Msg // The answer to the question that was sent.
|
||||
Error error // If something went wrong, this contains the error.
|
||||
Request *Msg // the question sent
|
||||
Reply *Msg // the answer to the question that was sent
|
||||
Error error // if something went wrong, this contains the error
|
||||
}
|
||||
|
||||
// DNS resource records.
|
||||
|
|
|
@ -146,7 +146,7 @@ type Server struct {
|
|||
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>
|
||||
}
|
||||
|
||||
// ListenAndServe starts a nameserver on the configured address.
|
||||
// ListenAndServe starts a nameserver on the configured addressin *Server.
|
||||
func (srv *Server) ListenAndServe() error {
|
||||
addr := srv.Addr
|
||||
if addr == "" {
|
||||
|
|
Loading…
Reference in New Issue