Skip to main content

Crate switchyard_server

Crate switchyard_server 

Source
Expand description

Rust HTTP server for libsy algorithms.

Modules§

config
Typed TOML configuration and explicit construction for the Rust server.

Structs§

BoundServer
A configured server with its listening socket already bound.
ServerError
Error returned while configuring or running the server.
ServerRunOptions
Runtime options shared by server entry points.
ServerState
Shared server state used by all endpoint handlers.
TlsOptions
TLS certificate paths used by the server.

Constants§

DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT
Default time allowed for active requests to finish during shutdown.
DEFAULT_LISTEN_BACKLOG
Default TCP listen backlog used by the Rust server.
DEFAULT_MAX_REQUEST_BODY_BYTES
Maximum buffered JSON request size accepted by the LLM endpoints.

Functions§

build_switchyard_router
Builds an Axum router for the supported LLM wire formats.
flush_observability
Flushes pending OTLP telemetry without shutting down process-wide providers.
initialize_observability
Installs metrics and tracing once for either the binary or an embedded host.
run_server
Validates the runtime and starts the HTTP server unless dry_run is set.

Type Aliases§

ServerResult
Result returned by server setup and lifecycle operations.