Trees | Indices | Help |
|
---|
|
Send queries to confd, and get back answers.
Since the confd model works by querying multiple master candidates, and getting back answers, this is an asynchronous library. It can either work through asyncore or with your own handling.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
boolean |
|
||
tuple |
|
||
|
|
|||
int |
|
|
|||
dict |
_requests dictionary indexes by salt, which contains data about the outstanding requests; the values are objects of type _Request |
|
Constructor for ConfdClient
|
Update the list of peers
|
Prepare a request to be sent on the wire. This function puts a proper salt in a confd request, puts the proper salt, and adds the correct magic number. |
Send a confd request to some MCs
|
Asynchronous handler for a confd reply Call the relevant callback associated to the current request. |
Send out all pending requests. Can be used for synchronous client use. |
Receive one reply.
|
Compute the minimum safe number of replies for a query. The algorithm is designed to work well for both small and big number of peers:
This guarantees that we progress monotonically: 1->1, 2->2, 3->2, 4->2, 5->3, 6->3, 7->4, etc.
|
Wait for replies to a given request. This method will wait until either the timeout expires or a minimum number (computed using _NeededReplies) of replies are received for the given salt. It is useful when doing synchronous calls to this library.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 24 16:51:23 2012 | http://epydoc.sourceforge.net |