CLICommands

distributed-state

snug distributed-state <COMMAND>

Distributed state and locking operations.

Subcommands

CommandWhat it does
getGet a state value
setSet a state value
deleteDelete a state value
listList keys in a namespace
delete-namespaceDelete all keys in a namespace
acquire-lockAcquire a distributed lock
extend-lockExtend (renew) a held distributed lock
release-lockRelease a distributed lock
lock-statusCheck 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-reconciliation

Next

On this page