MCPcopy
hub / github.com/coredns/coredns / Erratic

Struct Erratic

plugin/erratic/erratic.go:15–23  ·  view source on GitHub ↗

Erratic is a plugin that returns erratic responses to each client.

Source from the content-addressed store, hash-verified

13
14// Erratic is a plugin that returns erratic responses to each client.
15type Erratic struct {
16 q atomic.Uint64 // counter of queries
17 drop uint64
18 delay uint64
19 truncate uint64
20
21 duration time.Duration
22 large bool // undocumented feature; return large responses for A request (>512B, to test compression).
23}
24
25// ServeDNS implements the plugin.Handler interface.
26func (e *Erratic) ServeDNS(_ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected