The etcd3gw.lock Module

class etcd3gw.lock.Lock(name: str, ttl: int = 30, *, client: _client_module.Etcd3Client)[source]

Bases: object

acquire() bool[source]

Acquire the lock.

is_acquired() bool[source]

Check if the lock is acquired

refresh() int[source]

Refresh the lease on the lock

Returns:

release() bool[source]

Release the lock

property uuid: str

The unique id of the lock