Rust

source

Module

Where schedules come from: a Source lists Rows and builds each into an Entry.

Contents

use utopia_schedule::Entry;
Rust
pub struct Entry<P>

What Source::make returns for a [Row]: the trigger that decides when it runs, and the payload handed to the dispatch handler with every occurrence.

Also implements Debug.
use utopia_schedule::Row;
Rust
pub struct Row<D>

One schedule as the source of truth describes it: a lightweight descriptor the scheduler can diff cheaply. Building the actual schedule (parsing the spec, hydrating context) is deferred to Source::make and happens only when version changes.

use utopia_schedule::Source;
Rust
pub trait Source: Send + Sync

Where a scheduler's schedules come from, usually a database.

The scheduler converges memory to whatever Source::snapshot reports, so additions, updates and removals (including hard deletes no change feed can see) all follow from stating the desired set. A change feed (Source::since) is only ever an optimization on top of it.

Implemented byArc