extend_redlock

Function extend_redlock 

Source
pub async fn extend_redlock<F, Fut>(
    try_extend_fn: F,
    clients: &[RedisClient],
    acquire_results: &[bool],
    timeouts: &RedLockTimeouts,
    cancel_token: &Receiver<bool>,
) -> Result<Option<bool>, LockError>
where F: Fn(&RedisClient) -> Fut + Send + Sync + Clone + 'static, Fut: Future<Output = Result<bool, LockError>> + Send,
Expand description

Extends a lock using the RedLock algorithm across multiple Redis servers.

Similar to acquire, requires majority consensus for successful extension.

ยงArguments

  • try_extend_fn - Function that attempts to extend the lock on a single client
  • clients - List of Redis clients where lock was acquired
  • acquire_results - Previous acquire results indicating which clients hold the lock
  • timeouts - Timeout configuration
  • cancel_token - Cancellation token