scepter 0.1.5

Composable primitives for planet-scale time-series routing, indexing, and aggregation.
Documentation
//! Scepter provides composable primitives for large-scale time-series systems:
//! schema-rich keys, lexicographic routing, approximate field-hint indexing,
//! mergeable distributions, ingestion aggregation, and distributed query
//! planning.
//!
//! The crate is inspired by the public Monarch paper, but it is an independent
//! Rust library design intended for observability systems, log search, stream
//! processing, and distributed query engines.

#![forbid(unsafe_code)]
#![deny(missing_debug_implementations)]
#![deny(missing_docs)]

/// Distributed aggregation traits and collection aggregation helpers.
pub mod aggregate;
/// Optional Apache Arrow batch interchange helpers.
#[cfg(feature = "arrow")]
pub mod arrow;
/// Time-bucketed collection aggregation with admission windows.
pub mod collect;
/// Optional compressed field-hint indexes.
#[cfg(feature = "compressed-postings")]
pub mod compressed;
/// Distribution-valued metric primitives.
pub mod distribution;
/// Field-hint indexing and excerpt generation.
pub mod hint;
/// Ingest routing primitives.
pub mod ingest;
/// Lexicographic key encoding.
pub mod key;
/// Schema and logical time-series model types.
pub mod model;
/// Logical query planning and pushdown primitives.
pub mod query;
/// Query reliability primitives for replica choice and partial-result health.
pub mod reliability;
/// Lexicographic range sharding.
pub mod shard;
/// Standing-query scheduling and evaluator sharding.
pub mod standing;
/// Optional CBOR and Zstd wire-format helpers.
#[cfg(any(feature = "cbor", feature = "zstd"))]
pub mod wire;

pub use aggregate::{CollectionAggregator, Mergeable, PartialAggregate, Sum};
#[cfg(feature = "arrow")]
pub use arrow::{
    finalized_u64_buckets_to_record_batch, query_health_to_record_batch,
    replica_candidates_to_record_batch,
};
pub use collect::{
    AdmissionWindow, BucketedAggregator, CollectionError, DeltaPoint, FinalizedBucket, MaxReducer,
    MergeReducer, MinReducer, Reducer, SumReducer,
};
#[cfg(feature = "compressed-postings")]
pub use compressed::NumericFieldHintIndex;
pub use distribution::{
    Bucket, BucketLayout, CumulativePoint, DeltaWindow, Distribution, DistributionError, Exemplar,
};
pub use hint::{
    ngrams, trigrams, try_ngrams, ExcerptStrategy, FieldHint, FieldHintIndex, FieldPredicate,
    HintError,
};
pub use ingest::{DropPolicy, IngestDecision, IngestRouter, WriteEnvelope};
pub use key::{KeyEncoder, LexicographicKey};
pub use model::{
    Field, FieldValue, LocationResolver, MetricKind, MetricSchema, TargetSchema, TimeSeriesKey,
    ValueKind,
};
pub use query::{
    ExecutionLevel, FanoutPlan, LogicalPlan, PlanNode, PushdownPlanner, QueryFragment,
};
pub use reliability::{
    ChildIssue, IssueKind, QueryHealth, ReplicaCandidate, ReplicaQuality, ReplicaResolver,
    ReplicaState, ResolvedRange,
};
pub use shard::{LoadSample, RangeAssigner, RangeAssignment, RangeLoad, ShardError};
pub use standing::{EvaluatorShard, Schedule, StandingError, StandingQuery};
#[cfg(feature = "cbor")]
pub use wire::{from_cbor, to_cbor, WireDeltaPoint, WireError, WireFinalizedBucket};
#[cfg(all(feature = "cbor", feature = "zstd"))]
pub use wire::{from_cbor_zstd, to_cbor_zstd};
#[cfg(feature = "zstd")]
pub use wire::{zstd_compress, zstd_decompress};