Expand description
timslite - Rust time-series data storage library.
A high-performance, mmap-backed time-series data store with:
- Block-level aggregation (uncompressed payload max 256KB per block)
- Delayed compression (seal on overflow)
- Lazy segment lifecycle (on-demand open, idle-close after 30min)
- Time-indexed queries with binary search
- Explicit create/open/drop lifecycle for datasets
§Quick Start
ⓘ
use timslite::{Store, StoreConfig};
let config = StoreConfig::default();
let mut store = Store::open("/data/timslite", config).unwrap();
// Create a new dataset (specify segment sizes and compression)
store.create_dataset("my_data", "events",
64 * 1024 * 1024, // data_segment_size = 64MB
16 * 1024 * 1024, // index_segment_size = 16MB
6, // compress_level
0, // index_continuous
0, // retention in timestamp units (0 = no limit)
).unwrap();
// Open an existing dataset (parameters read from meta file)
store.open_dataset("my_data", "events").unwrap();
// ... write and queryRe-exports§
pub use config::DataSetConfig;pub use config::DataSetConfigBuilder;pub use config::StoreConfig;pub use config::StoreConfigBuilder;pub use error::Result;pub use error::TmslError;
Modules§
Structs§
- DataSet
- Data
SetInfo - Immutable dataset configuration info.
- Data
SetInspect Result - Result of
DataSet::inspect(). - Data
SetState - Mutable dataset state info.
- Dataset
Queue - Queue handle for a dataset (Clone-safe, singleton per dataset).
- Dataset
Queue Consumer - Consumer handle for a specific consumer group.
- Dataset
Queue Consumer Info - Immutable consumer-group configuration returned by inspect.
- Dataset
Queue Consumer Inspect Result - Consumer-group inspect result.
- Dataset
Queue Consumer Pending Entry - Public pending-entry snapshot returned by
DatasetQueueConsumer::inspect. - Dataset
Queue Consumer State - Mutable consumer-group state returned by inspect.
- Journal
Append Info - Journal
Index Info - Journal
Queue - Journal
Queue Consumer - Journal
Record - Pending
Entry - A single pending entry tracked in the consumer state file.
- Query
Iterator - Public lazy query iterator backed by a Store-managed dataset.
- Query
Length Iterator - Public lazy iterator for data lengths returned by
DataSet::query_length_iter. - Queue
Consumer Config - Runtime retry/visibility settings for one consumer group.
- Store
- The Store: top-level facade for managing datasets.
- Tick
Result - Result returned by a single
tick()call.
Enums§
Constants§
- BLOCK_
HEADER_ SIZE - Size of a block header in bytes.
- BLOCK_
MAX_ SIZE - Maximum payload size of a normal aggregated block in bytes.
- DATA_
HEADER_ SIZE - Data segment v1 default header size in bytes.
- FILE_
TYPE_ DATA - File type: data segment.
- FILE_
TYPE_ INDEX - File type: index segment.
- INDEX_
ENTRY_ SIZE - Size of an index entry in bytes.
- INDEX_
HEADER_ SIZE - Index segment default header size in bytes.
- INDEX_
VERSION - Index segment file format version.
- JOURNAL_
DATASET_ NAME - JOURNAL_
DATASET_ TYPE - MAGIC
- Magic bytes identifying a timslite file.
- QUEUE_
MAX_ PENDING_ ENTRIES - Maximum pending entries per consumer group.
- QUEUE_
STATE_ FILE_ SIZE - Queue state file size in bytes (4KB).
- QUEUE_
STATE_ MAGIC - Queue state file magic bytes (“QSTF”).
- QUEUE_
STATE_ VERSION - Queue state file version.
- VERSION
- Data segment and journal segment file format version.
Type Aliases§
- Queue
Poll Callback - Lightweight callback invoked after queue data notifications.