Skip to main content

Module config

Module config 

Source
Expand description

The server’s configuration: one TOML file. A configuration error stops the start and names its key, and an unknown key is an error.

Structs§

Config
The configuration serve runs with. Durations are written in whole seconds and sizes in bytes; each must be more than zero, and each has a default.
ConfigError
A configuration that could not be read, naming the key at fault.

Constants§

BODY_LIMIT
The largest request body unless configured: 16 MiB. The largest of 34,885 vCon files measured (public datasets and recorded test calls) was 5,141,813 bytes, a two-minute recording held inline; nearly all of their recordings are referenced by URL instead.
INFLATED_LIMIT
The largest inflation unless configured: four times BODY_LIMIT, so any vCon accepted plain is also accepted gzipped, with room left for gzipped payloads inside its signed layers.
PURGE_INTERVAL
Time between purge sweeps unless configured: a version is purged within an hour of falling due.
READ_TIMEOUT
How long a request body may take to arrive unless configured: a body at BODY_LIMIT needs about 2.2 Mbit/s.
ROTATION_WARN
Age of the oldest work waiting for key rotation before serve warns, unless configured: 30 days.

Functions§

load
Reads the configuration file at path.
parse
Reads a configuration from its TOML text.