Marco reference¶
-
class
marcopolo.marco.marco.
Marco
[source]¶ -
__init__
()[source]¶ Initializes all the data structures and sockets, setting timeouts and other socket options
-
marco
(max_nodes=None, exclude=[], timeout=None, params={}, retries=0, group='224.0.0.112')[source]¶ Sends a marco message to all nodes, which reply with a Polo message. Upon receiving all responses (those arriving before the timeout), a collection of the response information is returned.
Parameters: - exclude (list) – List of nodes to be excluded from the returned ValueError.
- timeout (int) – If set, overrides the default timeout value.
- retries (int) – If set to a value greater than 0, retries the retries times if the first attempt is unsuccessful
- max_nodes (int) – Maximum number of nodes to be returned. If set to None, no limit is applied.
Returns: A list of all responding nodes.
-
request_for
(service, node=None, max_nodes=None, exclude=[], params={}, timeout=None, group='224.0.0.112')[source]¶ Request all nodes offering a certain service or the details for one single node
Parameters: Returns: an array with all the available nodes
-