Expand description
Public plugin contract for the cc-lb proxy lifecycle.
The core proxy owns the wire-level server loop and drives requests through
parse -> authenticate -> route -> shape -> sign -> relay_stream.
This crate defines the stable types and object-safe traits used at those
boundaries: authentication plugins identify a Principal, router plugins
choose an Upstream and UpstreamDialect, dialects build a
ShapedRequest, signers consume it into a SignedRequest, and the core
relays the signed request while emitting ObserveEvent values to
observability hooks.
The crate deliberately uses http, bytes, and url types instead of
exposing the server’s transport implementation. Request body validation,
semantic JSON checks, and concrete HTTP client behavior live in downstream
crates, not in this API contract.
Re-exports§
pub use types::CredentialStrategy;pub use types::InternalError;pub use types::InternalErrorKind;pub use types::InternalErrorStage;pub use types::ObserveEvent;pub use types::PerCandidateReason;pub use types::PluginManifest;pub use types::Principal;pub use types::PrincipalKind;pub use types::PrincipalQuotas;pub use types::RateLimitKind;pub use types::RateLimitObservation;pub use types::RequestContext;pub use types::RetryDecision;pub use types::RouteDecision;pub use types::RoutingTrace;pub use types::ShapedRequest;pub use types::ShapedRequestBuilder;pub use types::SignedRequest;pub use types::SigningCapability;pub use types::SubscriptionQuotaCandidateSnapshot;pub use types::SubscriptionQuotaDataState;pub use types::TerminalStrategy;pub use types::Upstream;pub use types::UpstreamCandidate;pub use types::UpstreamKind;pub use types::shape_request;pub use types::sign_request;
Modules§
- types
- Shared public data types for plugin boundaries.
Structs§
- Filter
Output - Filter plugin output containing upstream selection results and per-candidate reasons.
Enums§
- Dialect
Error - Request shaping failures returned by
crate::UpstreamDialect. - Filter
Error - Filter plugin errors returned by
FilterPlugin. - Observability
Error - Observability hook failures returned by
crate::ObservabilityHook. - Route
Error - Routing failures returned by
crate::RouterPlugin. - Runtime
Error - Plugin runtime failures returned by
crate::PluginRuntime. - Signer
Error - Signing failures returned by
crate::Signerandcrate::SignerFactory. - Upstream
Error - Upstream failures observed after a request has been relayed.
Constants§
- BUILTIN_
CACHE_ AFFINITY_ ID - Stable registry id for the built-in cache-affinity router filter.
- BUILTIN_
CACHE_ AFFINITY_ NAME - Stable registry name for the built-in cache-affinity router filter.
- BUILTIN_
CACHE_ AFFINITY_ WIRE_ VERSION - Wire version exposed by the built-in cache-affinity router filter.
Traits§
- ApiKey
Aware Signer Factory - Factory extension that binds signer construction to the router-selected upstream.
- Filter
Plugin - Filter plugin boundary for upstream candidate filtering and decision-making.
- Observability
Hook - Non-blocking observability hook boundary.
- Plugin
Runtime - Runtime abstraction for concrete plugin systems such as Extism.
- Router
Plugin Deprecated - Router plugin boundary.
- Signer
- Signer boundary for applying credentials to shaped requests.
- Signer
Factory - Factory that builds upstream-specific signers.
- Upstream
Dialect - Upstream dialect boundary for request shaping and error normalization.