Commit cf7b0cc4 authored by Guido Trotter's avatar Guido Trotter
Browse files

Confd client: add module level documentation



Populate the docstring with documentation on the client library's usage.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 430b923c
......@@ -21,6 +21,23 @@
"""Ganeti confd client
Clients can use the confd client library to send requests to a group of master
candidates running confd. The expected usage is through the asyncore framework,
by sending queries, and asynchronously receiving replies through a callback.
This way the client library doesn't ever need to "wait" on a particular answer,
and can proceed even if some udp packets are lost. It's up to the user to
reschedule queries if they haven't received responses and they need them.
Example usage:
client = ConfdClient(...) # includes callback specification
req = confd_client.ConfdClientRequest(type=constants.CONFD_REQ_PING)
client.SendRequest(req)
# then make sure your client calls asyncore.loop() or daemon.Mainloop.Run()
# ... wait ...
# And your callback will be called by asyncore, when your query gets a
# response, or when it expires.
"""
import socket
import time
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment