mistral.engine.rpc_backend package¶
Subpackages¶
- mistral.engine.rpc_backend.kombu package
- mistral.engine.rpc_backend.oslo package
Submodules¶
mistral.engine.rpc_backend.base module¶
-
class
mistral.engine.rpc_backend.base.RPCClient(conf)¶ Bases:
object-
async_call(ctx, method, target=None, **kwargs)¶ Asynchronous call of RPC method.
Does not block the thread, just send invoking data to the RPC server and immediately returns nothing.
-
sync_call(ctx, method, target=None, **kwargs)¶ Synchronous call of RPC method.
Blocks the thread and wait for method result.
-
-
class
mistral.engine.rpc_backend.base.RPCServer(conf)¶ Bases:
object-
register_endpoint(endpoint)¶ Registers a new RPC endpoint.
Parameters: endpoint – an object containing methods which will be used as RPC methods.
-
run(executor='blocking')¶ Runs the RPC server.
Parameters: executor – Executor used to process incoming requests. Different implementations may support different options.
-
stop(graceful=False)¶ Stop the RPC server.
Parameters: graceful – True if this method call should wait till all internal threads are finished. Returns:
-
wait()¶ Wait till all internal threads are finished.
-
mistral.engine.rpc_backend.rpc module¶
-
class
mistral.engine.rpc_backend.rpc.EngineClient(rpc_conf_dict)¶ Bases:
mistral.engine.base.EngineRPC Engine client.
-
on_action_complete(*args, **kwargs)¶
-
pause_workflow(*args, **kwargs)¶
-
rerun_workflow(*args, **kwargs)¶
-
resume_workflow(*args, **kwargs)¶
-
rollback_workflow(*args, **kwargs)¶
-
start_action(*args, **kwargs)¶
-
start_workflow(*args, **kwargs)¶
-
stop_workflow(*args, **kwargs)¶
-
-
class
mistral.engine.rpc_backend.rpc.EventEngineClient(rpc_conf_dict)¶ Bases:
mistral.engine.base.EventEngineRPC EventEngine client.
-
create_event_trigger(trigger, events)¶
-
delete_event_trigger(trigger, events)¶
-
update_event_trigger(trigger)¶
-
-
class
mistral.engine.rpc_backend.rpc.ExecutorClient(rpc_conf_dict)¶ Bases:
mistral.engine.base.ExecutorRPC Executor client.
-
run_action(*args, **kwargs)¶ Sends a request to run action to executor.
Parameters: - action_ex_id – Action execution id.
- action_class_str – Action class name.
- attributes – Action class attributes.
- action_params – Action input parameters.
- target – Target (group of action executors).
- async – If True, run action in asynchronous mode (w/o waiting for completion).
- safe_rerun – If true, action would be re-run if executor dies during execution.
Returns: Action result.
-