Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResponse ¶
NewResponse generates a response message based on a request message
Types ¶
type RecordHandler ¶
type RecordHandler struct {
RecordStore RecordStorer
}
func NewRecordHandler ¶
func NewRecordHandler(store RecordStorer) *RecordHandler
func (*RecordHandler) ParseQuestion ¶
ParseQuestion loops through questions and creates answers based on what is in the record store
func (*RecordHandler) ServeDNS ¶
func (handler *RecordHandler) ServeDNS(w dns.ResponseWriter, request *dns.Msg)
ServeDNS implements interface for dns server handler
func (*RecordHandler) ServerErrorResponse ¶
func (handler *RecordHandler) ServerErrorResponse(w dns.ResponseWriter, response *dns.Msg, err error)
ServerErrorResponse returns a server error and logs the error that caused it
type ResponseWriter ¶
type ResponseWriter interface { // LocalAddr returns the net.Addr of the server LocalAddr() net.Addr // RemoteAddr returns the net.Addr of the client that sent the current request. RemoteAddr() net.Addr // WriteMsg writes a reply back to the client. WriteMsg(*dns.Msg) error // Write writes a raw buffer back to the client. Write([]byte) (int, error) // Close closes the connection. Close() error // TsigStatus returns the status of the Tsig. TsigStatus() error // TsigTimersOnly sets the tsig timers only boolean. TsigTimersOnly(bool) // Hijack lets the caller take over the connection. // After a call to Hijack(), the DNS package will not do anything with the connection. Hijack() }
type UnsupportedOpCodeError ¶
type UnsupportedOpCodeError struct {
Opcode int
}
func (*UnsupportedOpCodeError) Error ¶
func (e *UnsupportedOpCodeError) Error() string
type UnsupportedRecordTypeError ¶
type UnsupportedRecordTypeError struct {
Type uint16
}
func (*UnsupportedRecordTypeError) Error ¶
func (e *UnsupportedRecordTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.