pub struct ReactionRuntime {
pub id: String,
pub reaction_type: String,
pub status: ComponentStatus,
pub error_message: Option<String>,
pub queries: Vec<String>,
pub properties: HashMap<String, Value>,
}Expand description
Runtime representation of a reaction with execution status
ReactionRuntime combines reaction configuration with runtime state information.
Used for monitoring reaction execution, tracking which queries it subscribes to,
and inspecting delivery status.
§Status Values
ComponentStatus::Stopped: Reaction is configured but not runningComponentStatus::Starting: Reaction is initializing connectionsComponentStatus::Running: Reaction is actively delivering resultsComponentStatus::Error: Reaction encountered an error (seeerror_message)
§Examples
use drasi_lib::{DrasiLib, ComponentStatus};
let core = DrasiLib::builder().with_id("my-server").build().await?;
core.start().await?;
// Get runtime information for a reaction
let reaction_info = core.get_reaction_info("order_webhook").await?;
println!("Reaction {} ({}) is {:?}",
reaction_info.id,
reaction_info.reaction_type,
reaction_info.status
);
println!("Subscribed to queries: {:?}", reaction_info.queries);
if let Some(error) = reaction_info.error_message {
eprintln!("Reaction error: {}", error);
}Fields§
§id: StringUnique identifier for the reaction
reaction_type: StringType of reaction (e.g., “log”, “http”, “grpc”, “sse”, “platform”)
status: ComponentStatusCurrent status of the reaction
error_message: Option<String>Error message if status is Error
queries: Vec<String>IDs of queries this reaction subscribes to
properties: HashMap<String, Value>Reaction-specific configuration properties
Trait Implementations§
Source§impl Clone for ReactionRuntime
impl Clone for ReactionRuntime
Source§fn clone(&self) -> ReactionRuntime
fn clone(&self) -> ReactionRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReactionRuntime
impl Debug for ReactionRuntime
Source§impl<'de> Deserialize<'de> for ReactionRuntime
impl<'de> Deserialize<'de> for ReactionRuntime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ReactionRuntime
impl RefUnwindSafe for ReactionRuntime
impl Send for ReactionRuntime
impl Sync for ReactionRuntime
impl Unpin for ReactionRuntime
impl UnwindSafe for ReactionRuntime
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