docs for the RR interface

This commit is contained in:
Miek Gieben 2012-02-15 23:34:41 +01:00
parent ef709d6e77
commit 76c087f5ba
2 changed files with 9 additions and 4 deletions

11
dns.go
View File

@ -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.

View File

@ -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 == "" {