pub struct SourceRuntime {
pub id: String,
pub source_type: String,
pub status: ComponentStatus,
pub error_message: Option<String>,
pub properties: HashMap<String, Value>,
}Expand description
Runtime representation of a source with execution status
SourceRuntime combines configuration with runtime state information like
current execution status and error messages. It’s used for monitoring and
managing source lifecycle.
§Status Values
ComponentStatus::Stopped: Source is configured but not runningComponentStatus::Starting: Source is initializingComponentStatus::Running: Source is actively ingesting dataComponentStatus::Error: Source encountered an error (seeerror_message)
§Thread Safety
This struct is Clone and Serialize for sharing across threads and APIs.
§Examples
use drasi_lib::{DrasiLib, ComponentStatus};
let core = DrasiLib::builder().with_id("my-server").build().await?;
core.start().await?;
// Get runtime information for a source
let source_info = core.get_source_info("orders_db").await?;
println!("Source {} is {:?}", source_info.id, source_info.status);
if let Some(error) = source_info.error_message {
eprintln!("Source error: {}", error);
}Fields§
§id: StringUnique identifier for the source
source_type: StringType of source (e.g., “postgres”, “http”, “mock”, “platform”)
status: ComponentStatusCurrent status of the source
error_message: Option<String>Error message if status is Error
properties: HashMap<String, Value>Source-specific configuration properties
Trait Implementations§
Source§impl Clone for SourceRuntime
impl Clone for SourceRuntime
Source§fn clone(&self) -> SourceRuntime
fn clone(&self) -> SourceRuntime
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 SourceRuntime
impl Debug for SourceRuntime
Source§impl<'de> Deserialize<'de> for SourceRuntime
impl<'de> Deserialize<'de> for SourceRuntime
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 SourceRuntime
impl RefUnwindSafe for SourceRuntime
impl Send for SourceRuntime
impl Sync for SourceRuntime
impl Unpin for SourceRuntime
impl UnwindSafe for SourceRuntime
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