Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultHandler ¶
type DefaultHandler struct { // Logger is used for logging. A nil value will disable logging. Logger *zap.Logger // Entry is the entry ExecutablePlugin's tag. This cannot be nil. Entry handler.ExecutableChainNode // ConcurrentLimit controls the max concurrent queries for the DefaultHandler. // If ConcurrentLimit <= 0, means no limit. // When calling DefaultHandler.ServeDNS(), if a query exceeds the limit, it will wait on a FIFO queue until // - its ctx is done or currently there are more than 3 x ConcurrentLimit queries waiting -> The query will be dropped silently. // - it can be proceeded -> Normal procedure. ConcurrentLimit int // contains filtered or unexported fields }
func (*DefaultHandler) ServeDNS ¶
func (h *DefaultHandler) ServeDNS(ctx context.Context, qCtx *handler.Context, w ResponseWriter)
ServeDNS If entry returns an error, a SERVFAIL response will be sent back to client. If concurrentLimit is reached, the query will block and wait available token until ctx is done.
type DummyServerHandler ¶
func (*DummyServerHandler) ServeDNS ¶
func (d *DummyServerHandler) ServeDNS(_ context.Context, qCtx *handler.Context, w ResponseWriter)
Click to show internal directories.
Click to hide internal directories.