Skip to main content

Module charter

Module charter 

Source
Expand description

Conformance suites for the charter module’s stores (spec 3.5 §7.10, §7.11, §11; features charter and conformance).

A harness opens the backend; each open returns a new handle over the same data, as a restarted or second replica would see it. Every case writes under fresh sites, jobs, partitions and sources, so a harness may point every case at one shared database. The macros are used as process_store_conformance_tests! is; see the conformance module.

§Example

ⓘ
use std::sync::Arc;
use adk_kernel::charter::{CharterStore, InMemoryCharterStore};
use adk_kernel::conformance::charter::CharterStoreHarness;

struct InMemory;

#[async_trait::async_trait]
impl CharterStoreHarness for InMemory {
    async fn open(&self) -> Arc<dyn CharterStore> {
        Arc::new(InMemoryCharterStore::new())
    }

    fn is_durable(&self) -> bool {
        false
    }
}

adk_kernel::charter_store_conformance_tests! { harness = InMemory }

Re-exports§

pub use autonomy_store::AutonomyStoreHarness;
pub use charter_store::CharterStoreHarness;
pub use kpi_store::KpiStoreHarness;
pub use signal_store::SignalStoreHarness;

Modules§

autonomy_store
Conformance cases for AutonomyStore backends (spec 3.5 §7.11, §11).
charter_store
Conformance cases for CharterStore backends (spec 3.5 §7.6, §7.11, §11, A-I14, A-I23).
fixtures
Charters, decisions and signals the suites and the charter tests build (spec 3.5 §7.6, §7.10).
kpi_store
Conformance cases for KpiStore backends (spec 3.5 §7.11, §11).
signal_store
Conformance cases for SignalStore backends (spec 3.5 §7.10, §11).