Skip to main content

Module core

Module core 

Source
Expand description

Shared HTTP mechanics for the built-in disaggregated-serving proxies.

Proxy-specific protocol bodies remain in their owning modules.

Structs§

ProxyErrorResponse
ProxyHealthcheckResponse
Healthcheck response body shared by the proxies.
ProxyHttpError
Error type shared by both proxies, carrying an HTTP status and a message.
ProxyMeta
Identity of a built-in proxy. Each proxy module owns its own ProxyMeta so the proxy crate is the authority for the id/version recorded in BuiltinProxy evidence.

Functions§

forward_response
Forward an upstream response body verbatim, preserving status and content-type.
join_path
Join a base URL with a path, normalizing a single trailing slash on the base.
outbound_authorization
Resolve the outbound Authorization header from the inbound request or the OPENAI_API_KEY environment variable.
run
Build a multi-threaded Tokio runtime and drive run_async to completion.
status_code
Convert a reqwest status code into an axum/http status code.
upstream_status_error
Convert an unsuccessful upstream response into a 502 Bad Gateway ProxyHttpError that captures the upstream status and body.