Expand description
The mesh’s configuration: Config, from code or from the environment
(Config::from_env).
Secrets never come from here directly: the signing key and the API keys are read from
files that must have mode 0600 (read_secret_file).
Structs§
- Config
- The mesh’s configuration.
- Config
Error - A configuration error: what and why.
- Policy
- Per-function rules, by fully qualified function name. Functions without one are free.
- Rate
Limits - Rate limits (token buckets), per minute. Refused requests are answered
rate_limitedwithretry_after_secondsandRetry-After; nothing is ever queued. - Ttls
- Cache lifetimes. Content-addressed objects (descriptors, receipts, manifests, blobs) never expire: their bytes are fixed by their hash.
Enums§
- Base
UrlError - Why a base URL (
Config::base_url) is refused. - Publish
Domains - Which hosts may publish with
POST /bundles(DATUMESH_PUBLISH_DOMAINS): the mesh’s own namespaces always; then none (the default), named hosts, or any host with a valid key document (*). - Rule
- What a function’s cells need (the licence and payment stubs of step 1.4).
Constants§
- DEFAULT_
BATCH_ MAX - The default bound on a
POST /cellsbatch. - DEFAULT_
BUDGET - The default wall-clock budget of a request before it is answered
pending(SPEC 5.5). - DEFAULT_
POOL_ SIZE - The default size of the blocking pool, which is the concurrency limit of evaluation and store access (see the crate documentation for why).
- DEFAULT_
SLICE_ PAGE - The default number of members in one JSON page of
GET /slice. - MAX_
SLICE_ MEMBERS - The bound on the members of a slice served (SPEC 10.1: a manifest has at most 1,048,576).
- MAX_
SLICE_ PAGE - The bound on a JSON page of
GET /slice(limit=).
Functions§
- check_
base_ url - Checks a base URL (
Config::base_url) for a mesh signing ashost:https://with any host, or, whenhostis unrooted (is_unrooted),http://with127.0.0.1,[::1]orlocalhost; then an optional:<port>(1 to 65535) and nothing else: no path, query, fragment, trailing slash or userinfo. The form is checked first, then the scheme’s rule:http://for a rooted host isBaseUrlError::HttpRootedHostbefore anything about the URL’s host. - is_
unrooted - Whether a host is unrooted (SPEC 2.5, spec-0.4.3): its last label is
invalid(local.invalid,agent-7.local.invalid). Every other host is rooted. - read_
secret_ file - Reads a file holding a secret, refusing it unless only its owner may read or write it (mode 0600 or stricter, on Unix).