motoki317/Redlock Action
Provides distributed lock via the redlock algorithm.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| action | Action to perform. auto - Locks on this action and unlocks on post-run. lock - Only performs lock. (manual unlock needed!) unlock - Only performs unlock. | no | auto |
| hosts | Redis hosts, separated by comma. | no | localhost:6379 |
| name | Name of the lock. | yes | — |
| concurrency | Maximum lock "concurrency". If greater than 1, multiple clients are allowed to acquire the resource at the same time up to the specified concurrency, achieving semaphore-like behavior. | no | 1 |
| duration-seconds | Number of seconds to acquire the resource for. After the duration has passed without unlocking, the resource will be automatically unlocked. | no | 60 |
| retry-count | The max number of times this action will attempt to lock a resource before giving up. | no | 60 |
| retry-delay-ms | The time in milliseconds between attempts. | no | 1000 |
| retry-jitter-ms | The max time in milliseconds randomly added to retries to improve performance under high contention. | no | 200 |
| value | Random lock value - only needed for manual "unlock" action. | no | "" |
| heartbeat-pid | Heartbeat pid - only needed for manual "unlock" action. | no | "" |
Outputs
| name | description |
|---|---|
| value | Lock random value - used in manual unlock to release the resource. |
| heartbeat-pid | Heartbeat pid - used in manual unlock to release the resource. |