dragonfly.implementations.mesh_repeater module¶
Some template vars¶
Members: MeshRepeater ProxyEndpoint Functions: Classes:
Implementing a provider which is a pure client in a second dripline mesh, allowing a one directional link between otherwise independent meshes.
Summary¶
-
class
dragonfly.implementations.mesh_repeater.MeshRepeater(target_broker, **kwargs)¶ Bases:
dragonfly.implementations.mesh_repeater.MeshRepeaterProvider which acts as a pure client on another dripline mesh. It provides a communication link, but does not do any communication itself. Instances of ProxyEndpoint can be added to bind targets on the local mesh to the remote mesh. (see ProxyEndpoint for more details)
Keyword Arguments: - target_broker (str) – network-resolvable path to the broker to which requests are relayed
- target_user (str) – username used for connecting to the target mesh
- target_password (str) – password used for connecting to the target mesh
- name (str) – unique identifier across all dripline services (used to determine routing key)
- calibration (str||dict) – string use to process raw get result (with .format(raw)) or a dict to use for the same purpose where raw must be a key
- get_on_set (bool) – flag to toggle running ‘on_get’ after each ‘on_set’
target_broker (str): network-resolvable path to the broker to which requests are relayed target_user (str): username used for connecting to the target mesh target_password (str): password used for connecting to the target mesh
-
add_endpoint(endpoint)¶
-
cmd(target, method_name, value=[], payload={}, lockout_key=False, timeout=None, ignore_retcode=False)¶
-
endpoint(endpoint)¶
-
endpoint_names¶
-
endpoints¶
-
forward_request(target, request)¶ send a request message to a target in the remote mesh
target (str): full routing key to which request is sent request (RequestMessage): dripline.core.RequestMessage to send to target
-
get(target, timeout=None, ignore_retcode=False)¶
-
handle_request(channel, method, properties, request)¶
-
is_locked¶
-
list_endpoints()¶
-
lock(*args, **kwargs)¶
-
lockout_key¶
-
logging_status¶
-
on_cmd(*args, **kwargs)¶ WARNING! if you override this method, you must ensure you deal with lockout properly
-
on_config(attribute, value=None)¶ configure a property again
WARNING! if you override this method, you must ensure you deal with lockout properly
-
on_send(*commands)¶
-
on_set(*args, **kwargs)¶
-
ping(*args, **kwargs)¶ ignore all details and respond with an empty message
-
schedule_status¶
-
set(target, value, lockout_key=False, timeout=None, ignore_retcode=False)¶
-
set_condition(*args, **kwargs)¶ To actually do something inside a class, the set_condition should be implemented in the class itself.
-
unlock(*args, **kwargs)¶
-
class
dragonfly.implementations.mesh_repeater.ProxyEndpoint(target, **kwargs)¶ Bases:
dragonfly.implementations.mesh_repeater.ProxyEndpointEndpoint which responds to all RequestMessages received by passing them to the configured target via self.proivder (expected to be a MeshRepeater).
Keyword Arguments: - target – (str) name of the endpoint in the remote mesh, to which requests will be sent.
- name (str) – unique identifier across all dripline services (used to determine routing key)
- calibration (str||dict) – string use to process raw get result (with .format(raw)) or a dict to use for the same purpose where raw must be a key
- get_on_set (bool) – flag to toggle running ‘on_get’ after each ‘on_set’
target: (str) name of the endpoint in the remote mesh, to which requests will be sent.
-
handle_request(channel, method, properties, request)¶ send reply message with to a target in the remote mesh
channel (Channel): pika.Channel for interacting with RabbitMQ method: #TODO_DOC properties: #TODO_DOC request (RequestMessage): dripline.core.RequestMessage to send to target
-
is_locked¶
-
lock(lockout_key=None, *args, **kwargs)¶
-
lockout_key¶
-
on_cmd(*args, **kwargs)¶ WARNING! if you override this method, you must ensure you deal with lockout properly
-
on_config(attribute, value=None)¶ configure a property again
WARNING! if you override this method, you must ensure you deal with lockout properly
-
ping(*args, **kwargs)¶ ignore all details and respond with an empty message
-
set_condition(*args, **kwargs)¶ To actually do something inside a class, the set_condition should be implemented in the class itself.
-
unlock(*args, **kwargs)¶
End of modules condition
Data:
End of data condition