Skip to main content

Crate tako_rs_server

Crate tako_rs_server 

Source
Expand description

Server bootstrap for the Tako framework.

Hosts every concrete listener implementation (HTTP/1, TLS, HTTP/3, raw TCP, UDP, Unix sockets, plus the compio variants) and the PROXY protocol parser. Re-exported under the original tako::* paths via the umbrella crate.

Re-exports§

pub use server_compio::serve;compio
pub use server_compio::serve_with_config;compio
pub use server_compio::serve_with_shutdown;compio
pub use server_compio::serve_with_shutdown_and_config;compio
pub use server_tls_compio::serve_tls;compio-tls
pub use server_tls_compio::serve_tls_with_config;compio-tls
pub use server_tls_compio::serve_tls_with_shutdown;compio-tls
pub use server_tls_compio::serve_tls_with_shutdown_and_config;compio-tls

Modules§

server_compiocompio
server_tcp
Raw TCP server for handling arbitrary TCP connections. Raw TCP server for handling arbitrary TCP connections.
server_tls_compiocompio-tls and tls
TLS-enabled HTTP server implementation for secure connections (compio runtime).
server_udp
UDP datagram server for handling raw UDP packets. UDP datagram server for handling raw UDP packets.
socket_activationsocket-activation
systemd / s6 / catflap socket activation helpers (LISTEN_FDS). systemd / s6 / catflap socket activation.

Structs§

AcceptBackoff
Exponential backoff state for listener.accept() retry loops.
CompioServercompio
Compio-runtime server entry point. Construct with CompioServer::builder.
CompioServerBuildercompio
Fluent constructor for the compio-runtime CompioServer.
ReloadableResolvertls
A ResolvesServerCert whose backing rustls::sign::CertifiedKey can be swapped at runtime via ReloadableResolver::reload_from_pem.
ServerConfig
Production-readiness knobs shared by every Tako server transport.
ServerHandle
Background-task handle returned by every spawn_* method.

Enums§

ClientAuthtls
Client-authentication policy applied to a TLS server.
H3Congestion
Selectable QUIC congestion controller. Mirrors the controllers shipped by quinn::congestion. Exposed here so HTTP/3 deployments can pick a profile without depending on quinn directly from the application crate.
TlsCert
Optional TLS material the builder can attach to a TLS-mode server.

Functions§

bind_with_port_fallbackcompio
Bind a TCP listener for addr, asking interactively to increment the port if it is already in use (compio version).
build_rustls_server_configtls
Build an Arc<rustls::ServerConfig> from a TlsCert and the desired ALPN protocol list.
either
Convenience: await signal_a or signal_b, whichever fires first.