Primitives
Scepter is organized by concern.
| Module | Purpose |
|---|---|
key | Ordered key encoding with LexicographicKey and KeyEncoder. |
model | Schema-rich time-series types and location resolution. |
shard | Range assignment, load scoring, lookup, and splitting. |
hint | Compact field-hint indexes for query fanout pruning. |
distribution | Bucket layouts, distributions, exemplars, percentiles, and deltas. |
aggregate | Distributed aggregation traits and basic reducers. |
collect | Bucketed delta aggregation with admission windows. |
ingest | Write envelopes, stale-write policy, and range routing. |
query | Logical plans, fanout plans, and pushdown fragments. |
reliability | Replica selection and partial-result health metadata. |
standing | Periodic standing queries and stable evaluator sharding. |
arrow | Optional Apache Arrow batch exporters. |
compressed | Optional Roaring-backed numeric field-hint index for dense set operations. |
wire | Optional CBOR and Zstd helpers. |
Use the crate root re-exports for common workflows:
use scepter::{FieldHintIndex, FieldPredicate, RangeAssigner};
let mut ranges = RangeAssigner::new();
ranges.assign(b"a".to_vec()..b"m".to_vec(), "leaf-1")?;
let mut index = FieldHintIndex::new();
index.insert_value("ComputeTask", "job", "monarch", "leaf-1");
let candidates = index.candidates(
"ComputeTask",
"job",
&FieldPredicate::Equals("monarch".to_owned()),
);
assert!(candidates.contains("leaf-1"));
Ok::<(), scepter::ShardError>(())