protocols

This module contains the mosaic-orchestrator framework core functionality

class mosaic_orchestrator.protocols.Hashable(*args, **kwargs)[source]

Protocol that is used during caching for task state representation.

When a member variable of a task complies with this protocol the task_hash method is called to represent its state.

task_hash() Any[source]

Returns a hash that represents this objects state.

Returns:

Anything that represents this objects state. It must be pickle-able, i.e. compatible with the pickle.dumps() function of the standard library.

class mosaic_orchestrator.protocols.LifeCycleListener(*args, **kwargs)[source]

The methods of this protocol are called before startup and after teardown of a run.

class mosaic_orchestrator.protocols.Validate(*args, **kwargs)[source]

Protocol that is used to indentify and validate task members.

When a member variable of a task object conforms to this protocol the validate() function will be called during initialization of the task hierarchy. In case validation is unsuccessful an error is reported.

validate() Validation[source]

validates this object during initialization.

This function is called before any task is executed.

Returns:

ValidationSuccess or ValidationError in case of an error