Input passed to a router arbitrator.
Arbitration snapshots the router context at the decision boundary. The arbitrator receives the normalized input, candidate list, labels, rules, and original context without needing to know how each plug produced its evidence.
Summary
Functions
Builds an arbitration payload from a completed evidence-collection context.
Types
@type t() :: %Spectre.Router.Arbitration{ candidates: [Spectre.Router.Candidate.t()], context: Spectre.Router.Context.t(), input: Spectre.Input.t(), labels: [atom()], rules: [Spectre.Rule.t()], state: Spectre.State.t() | nil }
Functions
@spec from_context(Spectre.Router.Context.t()) :: t()
Builds an arbitration payload from a completed evidence-collection context.
Candidates are restored to evaluation order because router contexts prepend evidence as plugs run. The original context is retained so custom arbitrators can inspect traces and options without reconstructing them.
arbitration = Spectre.Router.Arbitration.from_context(router_context)