Skip to main content

Module server

Module server 

Source
Expand description

Server wiring that registers gateway routes and holds route state.

Re-exports§

pub use crate::objects::GatewayRequest;
pub use crate::objects::GatewayResponse;
pub use crate::objects::GatewayResponseValue;

Structs§

GatewayRoute
A single registered route: an HTTP method, a path matcher, and a handler.
GatewayRouteState
Shared, cloneable state threaded into every route handler.
GatewayRoutes
A route table paired with the state handlers dispatch against.
GatewayRoutesValue
A GatewayRoutes table wrapped as a runtime Object.

Functions§

configure_routes
Returns the full gateway route table backed by fresh in-memory state.
configure_routes_with_state
Returns the full gateway route table sharing the supplied state.
health_ref
Returns the Ref naming the gateway health endpoint (openai-gateway/health).