Documentation
¶
Overview ¶
Package pipeline composes the per-call security chain.
A chain is an ordered list of domain.Stage middlewares wrapped around a base handler, à la net/http middleware: stages run in order on the way in and unwind in reverse on the way out. The base handler is backed by a domain.Dispatcher. The package owns only the composition mechanism; the concrete stages (policy, redaction, secrets, resilience, audit) are assembled and ordered at the composition root, so reordering or inserting a stage is a wiring change there, never an edit here (design §3).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(stages []domain.Stage, base domain.HandlerFunc) domain.HandlerFunc
Chain composes stages around base into a single handler. stages[0] is the outermost; the chain terminates in base. A nil or empty stage list yields base unchanged.
func FromDispatcher ¶
func FromDispatcher(d domain.Dispatcher) domain.HandlerFunc
FromDispatcher adapts a Dispatcher into the base handler a chain terminates in.
Types ¶
This section is empty.