Skip to main content

Module keyspace

Module keyspace 

Source
Expand description

The keyspace: Ember’s core key-value store.

A Keyspace owns a flat HashMap<String, Entry> and handles get, set, delete, existence checks, and TTL management. Expired keys are removed lazily on access. Memory usage is tracked on every mutation for eviction and stats reporting.

Structs§

Keyspace
The core key-value store.
KeyspaceStats
Aggregated statistics for a keyspace.
ShardConfig
Configuration for a single keyspace / shard.
WrongType
Error returned when a command is used against a key holding the wrong type.
ZAddResult
Result of a ZADD operation, containing both the client-facing count and the list of members that were actually applied (for AOF correctness).

Enums§

EvictionPolicy
How the keyspace should handle writes when the memory limit is reached.
IncrError
Errors that can occur during INCR/DECR operations.
SetResult
Result of a set operation that may fail under memory pressure.
TtlResult
Result of a TTL query, matching Redis semantics.
WriteError
Error returned by write operations that may fail due to type mismatch or memory limits.