pub struct Config {Show 14 fields
pub bind: SocketAddr,
pub api_keys: Vec<String>,
pub allowed_origins: Vec<String>,
pub rate_limit: (u32, Duration),
pub wait_max: Duration,
pub wait_default: Duration,
pub webhook_max: Duration,
pub webhook_secret: Option<String>,
pub webhook_allow_private: bool,
pub database: Option<PathBuf>,
pub database_url: Option<String>,
pub instance_id: String,
pub health_sync_every: Duration,
pub maintenance_every: Duration,
}Fields§
§bind: SocketAddr§api_keys: Vec<String>§allowed_origins: Vec<String>§rate_limit: (u32, Duration)Requests per window, per bucket.
wait_max: DurationCeiling for a held wait request. Well under an edge proxy’s ceiling on
a proxied subrequest: the client re-issues rather than holding one long
request open through the edge.
wait_default: Duration§webhook_max: DurationCeiling for a webhook’s wait. Separate from wait_max on purpose: a
webhook holds no request open, and sharing the clamp is how cowbird once
capped webhooks at the long-poll ceiling.
webhook_secret: Option<String>§webhook_allow_private: bool§database: Option<PathBuf>SQLite file for issued addresses. None keeps them in memory.
database_url: Option<String>Postgres URL. Turns on fleet mode: addresses and health shared with every instance pointed at the same database.
instance_id: StringThis instance’s name in the shared health table. Must be unique per instance: two sharing an id overwrite each other’s row.
health_sync_every: DurationHow often fleet health is published and peers’ rows read back. A peer’s row older than three of these is ignored.
maintenance_every: DurationHow often health is flushed to disk and expired addresses reaped.