Skip to main content

coven_database/
operation_kind.rs

1//! The journal kind of each operation coven runs, and the `started_by` of
2//! those coven starts on its own. Sync gives each kind its steps; the
3//! database finds invites' rows itself, for `coven_invites` and to end them
4//! when the installation stops for good.
5
6/// An invite's kind, as schema SQL spells it.
7macro_rules! invite_kind {
8    () => {
9        "invite"
10    };
11}
12pub(crate) use invite_kind;
13
14/// An administrative change claimed in the store's sequence (§11).
15pub const SEQUENCE: &str = "sequence";
16/// An invite, from its code to its end, and the `started_by` of the
17/// operations it starts (§13.2).
18pub const INVITE: &str = invite_kind!();
19/// Granting or revoking a provider account's access (§14.2).
20pub const PROVIDER_ACCESS: &str = "provider-access";
21/// Advancing the floor and deleting the history below it (§16.6).
22pub const SEQUENCE_RETENTION: &str = "sequence-retention";
23/// An explicit reload of audiences from their snapshots (§16.5).
24pub const SEQUENCE_RELOAD: &str = "sequence-reload";
25/// Scanning the store's files for those nothing protects (§17.10).
26pub const SEQUENCE_FILES: &str = "sequence-files";
27/// The kind a breaking migration commits with its schema (§18.3).
28pub const SCHEMA_RAISE: &str = "schema-raise";
29/// Setting up storage on this device, from its first write to storage until
30/// it finishes or is undone (§11.6, §20.8); also its `started_by`.
31pub const STORAGE_SETUP: &str = "storage-setup";
32/// An S3 detection run, from before its first probe until a cleanup has
33/// confirmed its probes and uploads gone (§11.6, §20.7); also its
34/// `started_by`.
35pub const S3_DETECTION: &str = "s3-detection";
36/// The `started_by` of an operation coven starts on its own.
37pub const COVEN: &str = "coven";