Erratic is a plugin that returns erratic responses to each client.
| 13 | |
| 14 | // Erratic is a plugin that returns erratic responses to each client. |
| 15 | type 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. |
| 26 | func (e *Erratic) ServeDNS(_ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected