Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryHandler ¶
type EntryHandler struct {
// contains filtered or unexported fields
}
func NewEntryHandler ¶
func NewEntryHandler(opts EntryHandlerOpts) *EntryHandler
func (*EntryHandler) ServeDNS ¶
func (h *EntryHandler) ServeDNS(ctx context.Context, qCtx *query_context.Context) error
ServeDNS implements Handler. If entry returns an error, a SERVFAIL response will be set. If entry returns without a response, a REFUSED response will be set.
type EntryHandlerOpts ¶
type Handler ¶
type Handler interface { // ServeDNS handles incoming request qCtx and MUST ALWAYS set a response. // Implements must not keep and use qCtx after the ServeDNS returned. // ServeDNS should handle dns errors by itself and return a proper error responses // for clients. // If ServeDNS returns an error, caller considers that the error is associated // with the downstream connection and will close the downstream connection // immediately. ServeDNS(ctx context.Context, qCtx *query_context.Context) error }
Handler handles dns query.
Click to show internal directories.
Click to hide internal directories.