CLICommands
distributed-state
snug distributed-state <COMMAND>Distributed state and locking operations.
Subcommands
| Command | What it does |
|---|---|
get | Get a state value |
set | Set a state value |
delete | Delete a state value |
list | List keys in a namespace |
delete-namespace | Delete all keys in a namespace |
acquire-lock | Acquire a distributed lock |
extend-lock | Extend (renew) a held distributed lock |
release-lock | Release a distributed lock |
lock-status | Check lock status |
Run snug distributed-state <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug distributed-state get -n feature-flags -k new-ui-enabled
snug distributed-state set -n feature-flags -k new-ui-enabled -v 'true' -t 3600
snug distributed-state set -n feature-flags -k new-ui-enabled -v 'false' --if-version v1234567890
snug distributed-state delete -n feature-flags -k new-ui-enabled
snug distributed-state list -n feature-flags -l 50 -q ui
snug distributed-state delete-namespace -n feature-flags --pattern 'temp:*' --confirm
snug distributed-state acquire-lock -n locks -k payment-reconciliation -o worker-1 -t 60 -w 5000
snug distributed-state extend-lock -n locks -k payment-reconciliation -l lock_abc123 -o worker-1 -t 60
snug distributed-state release-lock -n locks -k payment-reconciliation -l lock_abc123 -o worker-1
snug distributed-state lock-status -n locks -k payment-reconciliationNext
- distributed-state guide - what the service does and when to reach for it.
- CLI reference - global options, output modes, and exit codes.