Expand description
Versioned, labelled storage for session specs (“bundles”).
A bundle is a session spec under a name. Every push stores an immutable
version, identified by the SHA-256 of the spec’s canonical JSON, so
pushing the same spec twice yields the same version. Labels such as
prod or staging are movable pointers to a version. A runtime loads
booking:prod, and promoting or rolling back is moving a label; nothing
is rebuilt or redeployed.
booking the latest version
booking@3f2a9c1d a version, by id or unique prefix
booking:prod the version a label points toopen_store picks a backend from a URI: a directory path (or
file://) for local work and tests, or gs://bucket/prefix for Cloud
Storage (feature gcs-store). Other backends implement BundleObjects,
a three-method object interface, and get versions and labels from
ObjectBundleStore.
Only valid specs are stored: a push that fails
validate is refused, so whatever a
runtime loads has already passed validation.
Structs§
- Bundle
Version - One stored version of a bundle.
- DirObjects
- Bundles in a local directory.
- GcsObjects
- Bundles in a Cloud Storage bucket, through the JSON API.
- Object
Bundle Store - A
BundleStoreover anyBundleObjectsbackend.
Enums§
- Bundle
Ref - Which version of a bundle to load.
- Store
Error - Why a bundle operation failed.
Traits§
- Bundle
Objects - The object interface a bundle backend implements. Keys are relative
paths with
/separators, such asbooking/versions/3f2a9c1d4e5f.json. - Bundle
Store - Versioned, labelled storage for session specs. See the module docs.
Functions§
- open_
store - Open the store a URI names: a directory path or
file://URI, orgs://bucket/prefix(featuregcs-store, credentials fromGoogleAccessToken::from_env).