Skip to content

Commit

Permalink
[docs] navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
0exp committed Mar 31, 2024
1 parent a3bc4e2 commit bbdf544
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ puts "Let's go" # will be called immediately after the lock is obtained
#### #lock! - exceptional lock obtaining
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- fails when (and with):
- (`RedisQueuedLocks::LockAlreadyObtainedError`) when `fail_fast` is `true` and lock is already obtained;
Expand Down Expand Up @@ -445,7 +445,7 @@ See `#lock` method [documentation](#lock---obtain-a-lock).
#### #lock_info
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- get the lock information;
- returns `nil` if lock does not exist;
Expand Down Expand Up @@ -492,7 +492,7 @@ rql.lock_info("your_lock_name")
#### #queue_info
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
Returns an information about the required lock queue by the lock name. The result
represnts the ordered lock request queue that is ordered by score (Redis Sets) and shows
Expand Down Expand Up @@ -531,7 +531,7 @@ rql.queue_info("your_lock_name")
#### #locked?
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- is the lock obtaied or not?
Expand All @@ -553,7 +553,7 @@ rql.queued?("your_lock_name") # => true/false
#### #unlock - release a lock
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- release the concrete lock with lock request queue;
- queue will be relased first;
Expand Down Expand Up @@ -602,7 +602,7 @@ rql.unlock("your_lock_name")
#### #clear_locks - release all locks and lock queues
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- release all obtained locks and related lock request queues;
- queues will be released first;
Expand Down Expand Up @@ -639,7 +639,7 @@ rql.clear_locks
#### #extend_lock_ttl
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- extends lock ttl by the required number of milliseconds;
- expects the lock name and the number of milliseconds;
Expand Down Expand Up @@ -680,7 +680,7 @@ rql.extend_lock_ttl("my_lock", 5_000) # NOTE: add 5_000 milliseconds
#### #locks - get list of obtained locks
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- uses redis `SCAN` under the hood;
- accepts:
Expand Down Expand Up @@ -712,7 +712,7 @@ rql.locks # or rql.locks(scan_size: 123)
#### #queues - get list of lock request queues
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- uses redis `SCAN` under the hood;
- accepts
Expand Down Expand Up @@ -744,7 +744,7 @@ rql.queues # or rql.queues(scan_size: 123)
#### #keys - get list of taken locks and queues
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- uses redis `SCAN` under the hood;
- accepts:
Expand Down Expand Up @@ -777,7 +777,7 @@ rql.keys # or rql.keys(scan_size: 123)
#### #locks_info - get list of locks with their info
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- uses redis `SCAN` under the hod;
- accepts `scan_size:`/`Integer` option (`config[:key_extraction_batch_size]` by default);
Expand Down Expand Up @@ -811,7 +811,7 @@ rql.locks_info # or rql.locks_info(scan_size: 123)
#### #queues_info - get list of queues with their info
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
- uses redis `SCAN` under the hod;
- accepts `scan_size:`/`Integer` option (`config[:key_extraction_batch_size]` by default);
Expand Down Expand Up @@ -840,7 +840,7 @@ rql.queues_info # or rql.qeuues_info(scan_size: 123)
#### #clear_dead_requests
[back_to_top](#usage)
<sup>\[[back to top](#usage)\]</sup>
In some cases your lock requests may become "dead". It can happen when your processs
that are enqueeud to the lock queue is failed unexpectedly (for some reason) before the lock acquire moment
Expand Down Expand Up @@ -913,6 +913,8 @@ By default `RedisQueuedLocks::Client` is configured with the void notifier (whic
### Instrumentation Events
<sup>\[[back to top](#instrumentation-events)\]</sup>
List of instrumentation events
- `redis_queued_locks.lock_obtained`
Expand Down

0 comments on commit bbdf544

Please sign in to comment.