faucet-state-redis
Redis-backed StateStore for the faucet-stream ecosystem. Persists incremental-replication bookmarks across pipeline runs so a source can resume exactly where it left off after a crash, restart, or scheduled invocation.
Install
[]
= "0.2"
= "0.2"
Usage
use Arc;
use ;
use RedisStateStore;
# async
Storage layout
Each entry is a single Redis string:
| Redis key | Value |
|---|---|
{namespace}:{state_key} |
UTF-8 JSON serialization of the bookmark value. |
The namespace is configured once in connect() and prefixed onto every key. Use it to keep multiple pipelines isolated within a shared Redis instance (e.g. prod:, staging:, team-a:).
Operations
get(key)—GET {namespace}:{key}→ parse JSON, returnNoneif the key is missing.put(key, value)—SET {namespace}:{key} <serialized>.delete(key)—DEL {namespace}:{key}(a missing key is not an error).
Connections use redis::aio::MultiplexedConnection, which is cheaply cloneable and safe to share across tasks.
Key validation
State keys are validated by [faucet_core::state::validate_state_key] — ASCII alphanumerics plus _ - : ., max 256 characters, no leading dot. Namespaces additionally disallow : (since the namespace itself becomes a key prefix).
License
Licensed under either of MIT or Apache-2.0 at your option.