feat(wfe-valkey): add Valkey provider for locks, queues, and lifecycle events
ValkeyLockProvider: SET NX EX for acquisition, Lua script for safe release. ValkeyQueueProvider: LPUSH/RPOP for FIFO queues. ValkeyLifecyclePublisher: PUBLISH to per-instance and global channels. Connections obtained once during construction (no per-operation TCP handshakes).
This commit is contained in:
8
wfe-valkey/tests/lock.rs
Normal file
8
wfe-valkey/tests/lock.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use wfe_core::lock_suite;
|
||||
|
||||
async fn make_provider() -> wfe_valkey::ValkeyLockProvider {
|
||||
let prefix = format!("wfe_test_{}", uuid::Uuid::new_v4().simple());
|
||||
wfe_valkey::ValkeyLockProvider::new("redis://localhost:6379", &prefix).await.unwrap()
|
||||
}
|
||||
|
||||
lock_suite!(make_provider);
|
||||
Reference in New Issue
Block a user