Bases: object
list of weak references to the object (if defined)
Request the creation of a group asynchronously.
Parameters: | group_id (str) – the id of the group to create |
---|---|
Returns: | None |
Return type: | CoordAsyncResult |
Delete a group asynchronously.
Parameters: | group_id (str) – the id of the group to leave |
---|---|
Returns: | Result |
Return type: | CoordAsyncResult |
Return the list composed by all groups ids asynchronously.
Returns: | the list of all created group ids |
---|---|
Return type: | CoordAsyncResult |
Return the leader for a group.
Parameters: | group_id – the id of the group: |
---|---|
Returns: | the leader |
Return type: | CoordAsyncResult |
Return a distributed lock.
Parameters: | name – The lock name that is used to identify it across all nodes. |
---|
Return the capabilities of a member asynchronously.
Parameters: |
|
---|---|
Returns: | capabilities of a member |
Return type: | CoordAsyncResult |
Return the list of all members ids of the specified group asynchronously.
Returns: | list of all created group ids |
---|---|
Return type: | CoordAsyncResult |
Method to run once in a while to be sure that the member is not dead and is still an active member of a group.
Join a group and establish group membership asynchronously.
Parameters: |
|
---|---|
Returns: | None |
Return type: | CoordAsyncResult |
Leave a group asynchronously.
Parameters: | group_id (str) – the id of the group to leave |
---|---|
Returns: | None |
Return type: | CoordAsyncResult |
Stand down as the group leader if we are.
Parameters: | group_id – The group where we don’t want to be a leader anymore |
---|
Start the service engine.
If needed, the establishment of a connection to the servers is initiated.
Stop the service engine.
If needed, the connection to servers is closed and the client will disappear from all joined groups.
Call a function when member gets elected as leader.
The callback functions will be executed when run_watchers is called.
Parameters: |
|
---|
Stop executing a function when a group_id sees a new member joined.
Parameters: |
|
---|
Stop executing a function when a group_id sees a new member leaving.
Parameters: |
|
---|
Update capabilities of the caller in the specified group asynchronously.
Parameters: |
|
---|---|
Returns: | None |
Return type: | CoordAsyncResult |
Call a function when member gets elected as leader.
The callback functions will be executed when run_watchers is called.
Parameters: |
|
---|
Bases: tooz.coordination.CoordinationDriver
A file based driver.
Bases: tooz.coordination.CoordinationDriver
A IPC based driver.
Bases: tooz.coordination.CoordinationDriver
A memcached based driver.
Bases: tooz.coordination.CoordinationDriver
A mysql based driver.
Bases: tooz.coordination.CoordinationDriver
A PostgreSQL based driver.
Bases: tooz.coordination.CoordinationDriver
Redis provides a few nice benefits that act as a poormans zookeeper.
To use a sentinel the connection URI must point to the Sentinel server. At connection time the sentinel will be asked for the current IP and port of the master and then connect there. The connection URI for sentinel should be written as follows:
redis://<sentinel host>:<sentinel port>?sentinel=<master name>
Additional sentinel hosts are listed with mutiple sentinel_fallback parameters as follows:
- redis://<sentinel host>:<sentinel port>?sentinel=<master name>&
- sentinel_fallback=<other sentinel host>:<sentinel port>& sentinel_fallback=<other sentinel host>:<sentinel port>& sentinel_fallback=<other sentinel host>:<sentinel port>
Further resources/links:
Note that this client will itself retry on transaction failure (when they keys being watched have changed underneath the current transaction). Currently the number of attempts that are tried is infinite (this might be addressed in https://github.com/andymccurdy/redis-py/issues/566 when that gets worked on). See http://redis.io/topics/transactions for more information on this topic.
Bases: tooz.drivers.zookeeper.KazooDriver
The driver using the Zake client which mimic a fake Kazoo client without the need of real ZooKeeper servers.
Bases: tooz.coordination.CoordinationDriver
Initialize the zookeeper driver.
Parameters: | timeout – connection timeout to wait when first connecting to the zookeeper server |
---|
Bases: tooz.drivers.zookeeper.BaseZooKeeperDriver
The driver using the Kazoo client against real ZooKeeper servers.