pub trait SubmissionHandler {
// Required methods
fn flow_execution_starting(&mut self) -> Result<()>;
fn should_enter_debugger(&mut self) -> Result<bool>;
fn flow_execution_ended(
&mut self,
state: &RunState,
metrics: Metrics
) -> Result<()>;
fn wait_for_submission(&mut self) -> Result<Option<Submission>>;
fn coordinator_is_exiting(&mut self, result: Result<()>) -> Result<()>;
}
Expand description
Programs that wish to submit a flow for execution via a Submission and then track it’s execution (such as a CLI or a UI) should implement this trait
Required Methods§
sourcefn flow_execution_starting(&mut self) -> Result<()>
fn flow_execution_starting(&mut self) -> Result<()>
Execution of the flow is starting
sourcefn should_enter_debugger(&mut self) -> Result<bool>
fn should_enter_debugger(&mut self) -> Result<bool>
The Coordinator executing the flow periodically will check if there has been a request to enter the debugger.
sourcefn flow_execution_ended(
&mut self,
state: &RunState,
metrics: Metrics
) -> Result<()>
fn flow_execution_ended( &mut self, state: &RunState, metrics: Metrics ) -> Result<()>
The Coordinator informs the submitter that the execution of the flow has ended
sourcefn wait_for_submission(&mut self) -> Result<Option<Submission>>
fn wait_for_submission(&mut self) -> Result<Option<Submission>>
The Coordinator wait for a Submission to be sent for execution
sourcefn coordinator_is_exiting(&mut self, result: Result<()>) -> Result<()>
fn coordinator_is_exiting(&mut self, result: Result<()>) -> Result<()>
The Coordinator is about to exit