Expand description
Plugin Chain contract. A Plugin returns an Outcome rather than writing to a Listener; earlier Plugins may inspect and modify the caller-owned Response buffer after awaiting Next. The Listener handles unanswered codes and errors.
Modules§
- http
- Small HTTP/1 listener for operational endpoints.
- logging
- Process-wide stdout logging, configured by the binary at startup.
- metrics
- The custom encoder matches Go floats, which
prometheus0.14 does not.
Structs§
- Context
- Borrowed Query state and reusable, preallocated Response buffer.
- Lifecycle
- Setup-time registration of ordered synchronous or asynchronous hooks.
- Listener
- A DNS Listener serving UDP and TCP on the same address.
- Listener
Key - Listener
Registry - Metadata
- Caller-provided, fixed-capacity Metadata slots.
- Router
- Server Blocks grouped by their Listener and ordered by Domain specificity.
- Self
Lookup Handle - Owned Listener state for a detached Query, including its Self Lookup depth.
- Server
- One Listener’s routing, admission and Plugin Chain execution.
- Server
Block - A Domain’s Plugin Chain and its ordered View filters.
- Stream
- A placeholder for a future Zone Transfer stream.
Enums§
- Action
- Admission
- Query admission result.
Respondwrites to the supplied Response buffer. - Error
- Errors for the Listener to log and answer with SERVFAIL.
- Outcome
- Explicit result of running a Plugin Chain.
- Phase
- Hook phases in the configuration lifecycle.
- Protocol
- Protocol used by a Query.
- Transport
- Transport named by a Server Block Key.
Traits§
- Chain
- Statically dispatched Plugin Chain supplied by the Plugin registry.
- Handler
- Async, statically dispatched Query handling. Clear and reuse the supplied
Response buffer; return
Dropto suppress a Response. Handlers must not block the runtime; TCP Queries on a connection may run concurrently. - Metadata
Source - A shared source whose values remain valid for a Query.
- Next
- A statically dispatched continuation of the Plugin Chain.
- Plugin
- A Plugin may await Next and inspect or modify its outcome and Response.
- Readiness
- A Plugin’s readiness, evaluated outside the Query hot path.
Functions§
- admit
- Apply the DNS Listener’s header, class, and EDNS admission policy.
- contain_
panic - Catch a Plugin Chain panic while polling, unless debug mode is enabled.
- finish_
outcome - Finish a Plugin outcome, reporting Plugin and malformed Response errors.
- panics_
total - Number of contained Plugin panics; metrics export is provided separately.
- response_
limit - Maximum Response size requested by the client for this protocol.
- startup_
domains - Render sorted served-Domain lines in CoreDNS’s startup format.
Type Aliases§
- View
Filter - A View filter receives the Query and client information without allocating.