diff --git a/serfclient/client.py b/serfclient/client.py index 71aec51..e4a737f 100644 --- a/serfclient/client.py +++ b/serfclient/client.py @@ -13,16 +13,26 @@ def __init__(self, host='localhost', port=7373, timeout=3): self.connection.handshake() def event(self, name, payload, coalesce=True): + """ + Send an event to the cluster. Can take an optional payload as well, + which will be sent in the form that it's provided. + """ return self.connection.call( 'event', {'Name': name, 'Payload': payload, 'Coalesce': coalesce}) def force_leave(self, name): + """ + Force a node to leave the cluster. + """ return self.connection.call( 'force-leave', {"Node": name}) def join(self, location): + """ + Join another cluster by provided a list of ip:port locations. + """ if not isinstance(location, (list, tuple)): location = [location] return self.connection.call(