Expand description
Shared outbound HTTP client for plugin callouts and upstream proxying.
One pooled hyper client pair lives in PluginResources for the process
lifetime: plugins (forward-auth, opa, loggers, upstream, …) reuse its
connection pool instead of constructing a client per node or per request.
Supports http and https (rustls, native roots); ssl_verify: false
selects a lazily-built client with certificate verification disabled.
Modules§
- idle
- Body wrappers for streaming upstream responses.
- tls
- Per-upstream TLS identities — mTLS to upstream backends.
Structs§
- NoVerification 🔒
- Certificate verifier that accepts everything — only reachable via an
explicit
ssl_verify: falsein plugin config. - Outbound
Client - Process-wide pooled HTTP client.
- Outbound
Request - A single outbound request.
timeout’s meaning depends on which call consumes it: [Client::request] applies it to the whole call — connect, request write, and response body collection. [Client::request_streaming] applies it only to connect, request write, and response headers; once headers are in, the body is unbounded here and left to the caller’s own idle bound (e.g.stream_idle_timeout_mson theupstreamnode). - Outbound
Response - A fully-buffered outbound response.
- Outbound
Streaming Response - A response whose headers have arrived and whose body is still streaming.
Enums§
- Outbound
Error - Outbound call failure, distinguishing timeouts from transport errors so callers can map them to distinct gateway error codes.
Functions§
- build_
insecure_ 🔒client - client_
tls_ connector - Builds a client TLS connector for a raw upstream WebSocket (
wss) handshake.
Type Aliases§
- BoxError
- The error type carried by every streaming response body in this crate
(
ResponseStream,OutboundStreamingResponse::body, theidlemodule’s wrappers). Deliberately nothyper::Error: that type has no public constructor anywhere in thehypercrate (every one of them ispub(super)), so nothing built on top of it can ever report its own failure (an idle timeout, a future size cap, a shutdown-drain cutoff) — only forward an error hyper already produced from a real connection. A boxedstd::error::Erroris strictly more permissive than what hyper’s ownserve_connectionrequires of a response body’s error type (Into<Box<dyn StdError + Send + Sync>>), so this costs nothing on the send side while unblocking every synthetic error this crate needs to produce.hyper::Erroritself satisfiesInto<BoxError>via the standard library’s blanketFrom<E: Error + Send + Sync> for Box<dyn Error + Send + Sync>, so forwarding a real hyper error through is a no-op conversion, not a loss of information. - Pooled
Client 🔒