Expand description
Chronon core — portable types and the SchedulerStore persistence port.
This crate defines domain models, error types, script identity ports, and the async storage trait that backends implement. It has no runtime, scheduler, or HTTP dependencies.
§Goals
- Stable DTOs (
Job,Run,Script) shared by scheduler, executor, and adapters - A single
SchedulerStoreport for jobs, runs, leases, and coordinator metadata - Host-injectable script identity via
ScriptContextandContextFactory
§Non-goals
- Running tick loops or executing scripts (see
chronon-runtimeandchronon-executor) - Choosing a storage backend (hosts register implementations at boot)
§Modules
store—SchedulerStoretrait and persistence contractmodels— jobs, runs, revisions, workers, schedule enumscontext—ScriptContextandContextFactoryfor script dispatchrouter— named store registration viaStoreRoutererror—ChrononErrorandResult
§Getting started
Implement SchedulerStore for your storage substrate, then register it on
StoreRouter::register_global or pass the store directly to ChrononBuilder in chronon-runtime.
See also: DEFAULT_STORE_NAME, ScriptHandle.
Re-exports§
pub use context::ContextFactory;pub use context::IdentityError;pub use context::JsonScriptContextFactory;pub use context::NoOpContextFactory;pub use context::NoOpScriptContext;pub use context::ScriptContext;pub use handle::ScriptHandle;pub use error::ChrononError;pub use error::Result;pub use models::Job;pub use models::JobRevision;pub use models::Lease;pub use models::MisfirePolicy;pub use models::PartitionAssignment;pub use models::RetryPolicy;pub use models::Run;pub use models::RunStatus;pub use models::ScheduleKind;pub use models::SchedulerLeader;pub use models::Script;pub use models::Worker;pub use models::WorkerStatus;pub use router::default_store_from_global;pub use router::StoreRouter;pub use router::DEFAULT_STORE_NAME;pub use store::SchedulerStore;