Skip to main content

Crate cc_lb_plugin_api

Crate cc_lb_plugin_api 

Source
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§

FilterOutput
Filter plugin output containing upstream selection results and per-candidate reasons.

Enums§

DialectError
Request shaping failures returned by crate::UpstreamDialect.
FilterError
Filter plugin errors returned by FilterPlugin.
ObservabilityError
Observability hook failures returned by crate::ObservabilityHook.
RouteError
Routing failures returned by crate::RouterPlugin.
RuntimeError
Plugin runtime failures returned by crate::PluginRuntime.
SignerError
Signing failures returned by crate::Signer and crate::SignerFactory.
UpstreamError
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§

ApiKeyAwareSignerFactory
Factory extension that binds signer construction to the router-selected upstream.
FilterPlugin
Filter plugin boundary for upstream candidate filtering and decision-making.
ObservabilityHook
Non-blocking observability hook boundary.
PluginRuntime
Runtime abstraction for concrete plugin systems such as Extism.
RouterPluginDeprecated
Router plugin boundary.
Signer
Signer boundary for applying credentials to shaped requests.
SignerFactory
Factory that builds upstream-specific signers.
UpstreamDialect
Upstream dialect boundary for request shaping and error normalization.