Configuration

Server configuration

toboggan-server accepts the following CLI options:

toboggan-server [OPTIONS] <TALK>

Options:
  --host <IP>                  Host to bind to [default: 127.0.0.1]
  --port <PORT>                Port to bind to [default: 8080]
  --max-clients <N>            Maximum number of WebSocket clients [default: 100]
  --heartbeat-interval-secs <N> Heartbeat interval [default: 30]
  --shutdown-timeout-secs <N>   Graceful shutdown timeout [default: 30]
  --cleanup-interval-secs <N>   Client cleanup interval [default: 60]
  --allowed-origins <LIST>      Comma-separated CORS origins
  --public-dir <DIR>            Static assets directory served at `/public/`
  --watch                      Reload the talk when the file changes

These options also read from environment variables:

VariableDescription
TOBOGGAN_HOSTServer bind host
TOBOGGAN_PORTServer bind port
TOBOGGAN_MAX_CLIENTSMaximum number of clients
TOBOGGAN_HEARTBEAT_INTERVALHeartbeat interval in seconds
TOBOGGAN_SHUTDOWN_TIMEOUTShutdown timeout in seconds
TOBOGGAN_CLEANUP_INTERVALCleanup interval in seconds
TOBOGGAN_CORS_ORIGINSComma-separated list of allowed origins
TOBOGGAN_PUBLIC_DIROptional public assets directory
TOBOGGAN_WATCHEnable watch mode

Client configuration

toboggan-core exposes a reusable client config helper:

[client]
api_url = "http://localhost:8080"
websocket_url = "ws://localhost:8080/api/ws"

[client.retry]
max_retries = 10
initial_retry_delay = "1s"
max_retry_delay = "30s"
backoff_factor = 2.0
use_jitter = true

Logging

The server and clients use tracing. Set RUST_LOG to control verbosity:

RUST_LOG=info toboggan-server talk.toml
RUST_LOG=toboggan_server=debug toboggan-server talk.toml
RUST_LOG=toboggan_client=trace toboggan-tui http://localhost:8080