Documentation
¶
Overview ¶
Package annotator is the official example Interseptor extension (see docs/extensions.md and issue #25). It is intentionally small and dependency-light: a working demonstration of the Phase-1 in-process hook API that a third-party author can copy.
What it does: when a flow is captured, if its host contains any of the configured substrings, it adds a tag to that flow — so an operator can, for example, auto-label every request that touches an internal admin host.
It follows the two rules every hook must follow:
- never block the proxy hot path — the hook body just hands off to a goroutine and returns immediately;
- never import proxy/control types — it talks to the host through the small Store interface below, so it stays decoupled and unit-testable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// HostContains: a flow is annotated when its host contains any of these
// (case-insensitive) substrings. Empty means "match nothing".
HostContains []string
// Tag applied to matching flows. Defaults to "annotated" when empty.
Tag string
}
Config declares which flows to tag and with what.
Click to show internal directories.
Click to hide internal directories.