Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/badboy/redlock-rs
/ functions
Functions
26 in github.com/badboy/redlock-rs
⨍
Functions
26
◇
Types & classes
3
↓ 15 callers
Method
get_unique_lock_id
Get 20 random bytes from `/dev/urandom`.
src/redlock.rs:86
↓ 10 callers
Method
lock
Acquire the lock for the given resource and the requested TTL. If it succeeds, a `Lock` instance is returned, including the value and the validity ti
src/redlock.rs:136
↓ 8 callers
Function
init
(docker: &Cli)
src/redlock.rs:245
↓ 4 callers
Method
unlock
Unlock the given lock. Unlock is best effort. It will simply try to contact all instances and remove the key.
src/redlock.rs:229
↓ 2 callers
Method
unlock_instance
(&self, client: &redis::Client, resource: &[u8], val: &[u8])
src/redlock.rs:212
↓ 1 callers
Method
acquire
(&self, resource: &[u8], ttl: usize)
src/redlock.rs:201
↓ 1 callers
Method
lock_instance
( &self, client: &redis::Client, resource: &[u8], val: &[u8], ttl: usi
src/redlock.rs:108
↓ 1 callers
Function
start_container
(docker: &Cli)
src/redlock.rs:255
Method
acquire_async
( &self, resource: &[u8], ttl: usize, )
src/redlock.rs:183
Method
drop
(&mut self)
src/redlock.rs:49
Function
main
()
examples/basic.rs:9
Method
new
Create a new lock manager instance, defined by the given Redis connection uris. Quorum is defined to be N/2+1, with N being the number of given Redis
src/redlock.rs:59
Method
set_retry
Set retry count and retry delay. Retry count defaults to `3`. Retry delay defaults to `200`.
src/redlock.rs:103
Function
test_redlock_direct_lock_succeeds
()
src/redlock.rs:323
Function
test_redlock_direct_unlock_fails
()
src/redlock.rs:296
Function
test_redlock_direct_unlock_succeeds
()
src/redlock.rs:308
Function
test_redlock_get_unique_id
()
src/redlock.rs:267
Function
test_redlock_get_unique_id_uniqueness
()
src/redlock.rs:274
Function
test_redlock_lock
()
src/redlock.rs:363
Function
test_redlock_lock_error
()
src/redlock.rs:444
Function
test_redlock_lock_unlock
()
src/redlock.rs:386
Function
test_redlock_lock_unlock_raii
()
src/redlock.rs:415
Function
test_redlock_unlock
()
src/redlock.rs:338
Function
test_redlock_valid_instance
()
src/redlock.rs:287
Method
with_client
(server: Client)
src/redlock.rs:68
Method
with_clients
Create a new lock manager instance, defined by the given Redis client instance. Quorum is defined to be N/2+1, with N being the number of given client
src/redlock.rs:74