Expand description
§kmb-types: Core types for Kimberlite
This crate contains shared types used across the Kimberlite system:
- Entity IDs (
TenantId,StreamId,Offset,GroupId) - Cryptographic types (
Hash) - Temporal types (
Timestamp) - Log record types (
RecordKind,RecordHeader,Checkpoint,CheckpointPolicy) - Projection tracking (
AppliedIndex) - Idempotency (
IdempotencyId) - Recovery tracking (
Generation,RecoveryRecord,RecoveryReason) - Data classification (
DataClass) - Placement rules (
Placement,Region) - Stream metadata (
StreamMetadata) - Audit actions (
AuditAction) - Event persistence (
EventPersister,PersistError)
Structs§
- Applied
Index - Tracks which log entry a projection row was derived from.
- Batch
Payload - A batch of events to append to a stream.
- Checkpoint
- A periodic verification checkpoint stored in the log.
- Checkpoint
Policy - Policy for when to create checkpoints.
- Generation
- Monotonically increasing recovery generation.
- GroupId
- Unique identifier for a replication group.
- Hash
- A 32-byte cryptographic hash.
- Idempotency
Id - Unique identifier for duplicate transaction prevention.
- Offset
- Position of an event within a stream.
- Record
Header - Metadata header for every log record.
- Recovery
Record - Records a recovery event with explicit tracking of any data loss.
- Stream
Id - Unique identifier for a stream within the system.
- Stream
Metadata - Metadata describing a stream’s configuration and current state.
- Stream
Name - Human-readable name for a stream.
- Tenant
Id - Unique identifier for a tenant (organization/customer).
- Timestamp
- Wall-clock timestamp with monotonic guarantee within the system.
Enums§
- Audit
Action - Actions recorded in the audit log.
- Data
Class - Classification of data for compliance purposes.
- Persist
Error - Error returned when event persistence fails.
- Placement
- Placement policy for a stream.
- Record
Kind - The kind of record stored in the log.
- Recovery
Reason - Reason why a recovery was triggered.
- Region
- Geographic region for data placement.
Constants§
- HASH_
LENGTH - Length of cryptographic hashes in bytes (SHA-256 / BLAKE3).
- IDEMPOTENCY_
ID_ LENGTH - Length of idempotency IDs in bytes.
Traits§
- Event
Persister - Abstraction for persisting events to the durable event log.