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.
Export
The [export] table.
ExportS3
How to reach the S3-compatible service an export writes to: every key of [storage.s3] but the bucket and prefix, which --to names, and allow_versioning, which only the server’s own storage reads.
Operator
The operator listener: the [operator] table. With it, serve listens on a second address that serves operator keys only, and listen serves tenant keys only.
ParquetSettings
The [storage.parquet] table.
PostgresSettings
How to reach the PostgreSQL database: the [catalog.postgres] table. TLS, with the server’s certificate chain and host name verified, is the only way it is reached.
S3Settings
How to reach the bucket: the [storage.s3] table.
Storage
Where the server keeps its data: the [storage] table. A file without it keeps everything in data_dir.
StorageError
Why the storage the configuration names cannot be used: the message says which setting or step.

Enums§

CatalogStore
Where the catalogs and the registry are kept: catalog.backend.
ObjectStore
Where the sealed vCon objects are kept: storage.objects.

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.
CONNECTIONS_MAX
The most connections limits.connections may be set to: a bound that keeps a mistyped number from asking for millions of file descriptors.
CONNECTION_LIMIT_MAX
The most seconds a connection limit may be set to: an hour. A limit meant to close a stalled connection that waits longer than this closes none in practice.
CSP_REPORTS_MAX
The most reports a minute limits.csp_reports and limits.csp_reports_per_address may be set to. Each report taken costs one write to the registry, so a larger number would bound nothing.
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.
PACK_INTERVAL
Time between pack runs unless configured.
PACK_LIMIT
The largest sealed object packed unless configured: 16 MiB, the default largest request body.
POSTGRES_CONNECT_TIMEOUT
How long a connection, or a wait for a free one, may take unless configured.
POSTGRES_LOCK_TIMEOUT
The longest a statement may wait for a lock unless configured.
POSTGRES_NAME_LIMIT
The longest database or role name: PostgreSQL cuts a longer one to this many bytes (NAMEDATALEN - 1), which would name another database or role.
POSTGRES_POOL
The most connections open at once unless configured.
POSTGRES_PORT
The PostgreSQL port unless configured.
POSTGRES_STATEMENT_TIMEOUT
The longest a statement may run unless configured.
POSTGRES_TIMEOUT_LIMIT
The longest statement_timeout and lock_timeout, in whole seconds: PostgreSQL holds each as milliseconds in a 32-bit integer.
PURGE_INTERVAL
Time between purge sweeps unless configured: a version is purged within an hour of falling due.
READER_GRACE
How long an older manifest, and a file a compaction stopped naming, stays for readers outside the server unless configured: 15 minutes.
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.
S3_TIMEOUT
How long one S3 request may take unless configured.

Functions§

load
Reads the configuration file at path.
parse
Reads a configuration from its TOML text.
same_socket
Whether two listening addresses would take the same socket: the same port, other than the port 0 that asks the system for a free one, on the same address, or on addresses of one family of which one is the unspecified address, which takes every address of the family.