pub struct EventTriggerRule {
pub on_event: EventKind,
pub source_workflow: String,
pub target_workflow: String,
pub max_chain_depth: u8,
}Expand description
A rule that maps a domain event to a workflow to trigger.
§Examples
use ironflow_runtime::trigger::event::EventTriggerRule;
use ironflow_store::entities::EventKind;
let rule = EventTriggerRule {
on_event: EventKind::RunFailed,
source_workflow: "deploy".to_string(),
target_workflow: "rollback".to_string(),
max_chain_depth: 3,
};
assert_eq!(rule.target_workflow, "rollback");Fields§
§on_event: EventKindThe event kind to react to.
source_workflow: StringOnly react to events from this workflow.
target_workflow: StringThe workflow to trigger.
max_chain_depth: u8Maximum chaining depth (default 3). Beyond this, the event is ignored and logged.
Trait Implementations§
Source§impl Clone for EventTriggerRule
impl Clone for EventTriggerRule
Source§fn clone(&self) -> EventTriggerRule
fn clone(&self) -> EventTriggerRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventTriggerRule
impl RefUnwindSafe for EventTriggerRule
impl Send for EventTriggerRule
impl Sync for EventTriggerRule
impl Unpin for EventTriggerRule
impl UnsafeUnpin for EventTriggerRule
impl UnwindSafe for EventTriggerRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more