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).
9 lines
281 B
Rust
9 lines
281 B
Rust
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);
|