Public
Script
stevekrouse avatar
dlock
@stevekrouse
Script
dlock - free distributed lock as a service https://dlock.univalent.net/ Usage API Acquire a lock. The id path segment is the lock ID - choose your own. https://dlock.univalent.net/lock/arbitrary-string/acquire?ttl=60 {"lease":1,"deadline":1655572186} Another attempt to acquire the same lock within its TTL will fail with HTTP status code 409. https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/acquire?ttl=60 {"error":"lock is acquired by another client","deadline":1655572186} The previous lock can be renewed with its lease number, like a heartbeat https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/acquire?ttl=60&lease=1 {"lease":1,"deadline":1655572824} Release a lock https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/release?lease=42
1
Next
October 23, 2023