Expand description
Storage contract for agent-effects.
This crate holds what a store persists and enforces: effect identity
(id), classification (kind, failure), the state machine
(state), records, leases and audit events, and the EffectStore
trait. Store backends depend on this crate only, never on the runtime.
The rules (lease fencing, version checks, the transition table, attempt
bookkeeping) live in EffectRecord’s pure methods. A store’s job is
only to run “load, apply, save the record and its audit event”
atomically, so every backend behaves the same. The testkit feature’s
testkit::conformance suite checks that.
Re-exports§
pub use failure::Disposition;pub use failure::FailureClass;pub use id::EffectId;pub use id::EffectKey;pub use id::EffectName;pub use id::IdempotencyKey;pub use id::IdentityError;pub use id::LogicalKey;pub use id::WorkerId;pub use kind::EffectKind;pub use state::EffectStatus;pub use state::InvalidTransition;pub use state::Transition;
Modules§
- failure
- Classification of execution failures.
- id
- Effect identity: record ids, logical keys and remote idempotency keys.
- kind
- Behavioral classification of effects.
- state
- The effect state machine.
- testkit
- Conformance suite for
EffectStoreimplementations.
Structs§
- Effect
Event - One entry of an effect’s audit trail.
- Effect
Record - The durable state of one effect.
- Error
Record - A recorded failure.
- Insert
Outcome - The result of
EffectStore::insert_or_get. - Lease
- Proof of holding an effect’s execution lease.
- List
Query - A filter for
EffectStore::list. - NewEffect
- A new effect to record.
- Prune
Query - Which records
EffectStore::prunedeletes: those in a settledstatusthat last changed at leastolder_thanbeforenowand hold no live lease atnow. - Transition
Request - A request to move an effect through one
Transition.
Enums§
- Store
Error - Why a store operation failed.
Traits§
- Effect
Store - Persistence for effect records, leases and audit events.