Skip to main content

Module server

Module server 

Source
Expand description

Axum HTTP/WebSocket server for the worker process.

Supports optional bearer token authentication on WebSocket connections. Set a token via worker_router_authenticated or the --token CLI flag.

Structs§

ShutdownSignal
Resolves when the worker has been asked to stop.

Functions§

serve_worker
Start a worker server on the given address.
serve_worker_authenticated
Start a worker server with authentication.
worker_router
Build a worker server router (no authentication).
worker_router_authenticated
Build a worker server router with authentication.
worker_router_with_dirs
Build a worker server router with custom directories.
worker_router_with_shutdown
Build a worker router together with the handle that stops it.