reactive_graph_reactive_service_api/
reactive_instance_event_manager.rs1use async_trait::async_trait;
2use springtime_di::injectable;
3
4use crate::ReactiveInstanceEvent;
5use crate::ReactiveInstanceEventTypes;
6use reactive_graph_lifecycle::Lifecycle;
7use reactive_graph_reactive_model_impl::ReactiveEntity;
8
9pub const REACTIVE_INSTANCE_EVENT_PROPERTY_LABEL: &str = "label";
10
11#[injectable]
12#[async_trait]
13pub trait ReactiveInstanceEventManager: Send + Sync + Lifecycle {
14 fn emit_event(&self, event: ReactiveInstanceEvent);
16
17 fn get_reactive_instance_event_instances(&self) -> Vec<ReactiveEntity>;
19
20 fn get_reactive_instance_event_instance(&self, event_type: ReactiveInstanceEventTypes) -> Option<ReactiveEntity>;
22}