etcd.modules.leader module

class etcd.modules.leader.LeaderMod(client)[source]

Bases: etcd.common_ops.CommonOps

‘Leader’ functionality for consensus-based assignment. If multiple processes try to assign different simple strings to the given key, the first will succeed and block the others until the TTL expires. The same process repeats for all subsequent assignments.

delete(key, value)[source]
get(key)[source]
set_or_renew(key, value, ttl)[source]