pub struct ActorConfig {
pub node: GraphNode,
pub resolved_env: HashMap<String, String>,
pub config: HashMap<String, Value>,
pub namespace: Option<String>,
pub inport_connection_counts: HashMap<String, usize>,
}Expand description
Enhanced configuration for actors containing metadata, environment variables, and resolved config
Fields§
§node: GraphNodeFull GraphNode snapshot including metadata
resolved_env: HashMap<String, String>Resolved environment variables
config: HashMap<String, Value>Final processed configuration combining metadata and environment variables
namespace: Option<String>Graph namespace (for multi-graph support)
inport_connection_counts: HashMap<String, usize>Number of upstream connections per inport name. Set by the network at startup from the connection topology. Used by ActorProcess to know when all inputs for a tick have arrived.
Implementations§
Source§impl ActorConfig
impl ActorConfig
Sourcepub fn from_node(node: GraphNode) -> Result<Self, ConfigError>
pub fn from_node(node: GraphNode) -> Result<Self, ConfigError>
Create ActorConfig from a GraphNode, resolving environment variables
Sourcepub fn from_node_with_namespace(
node: GraphNode,
namespace: Option<String>,
) -> Result<Self, ConfigError>
pub fn from_node_with_namespace( node: GraphNode, namespace: Option<String>, ) -> Result<Self, ConfigError>
Create ActorConfig from a GraphNode with namespace support
Sourcepub fn get_metadata(&self) -> Option<&HashMap<String, Value>>
pub fn get_metadata(&self) -> Option<&HashMap<String, Value>>
Get metadata from the original GraphNode
Sourcepub fn get_component(&self) -> &str
pub fn get_component(&self) -> &str
Get component name from the GraphNode
Sourcepub fn get_node_id(&self) -> &str
pub fn get_node_id(&self) -> &str
Get node ID from the GraphNode
Sourcepub fn get_string(&self, key: &str) -> Option<String>
pub fn get_string(&self, key: &str) -> Option<String>
Helper method to get string value from config
Sourcepub fn get_number(&self, key: &str) -> Option<f64>
pub fn get_number(&self, key: &str) -> Option<f64>
Helper method to get number value from config
Sourcepub fn get_bool(&self, key: &str) -> Option<bool>
pub fn get_bool(&self, key: &str) -> Option<bool>
Helper method to get boolean value from config
Sourcepub fn get_integer(&self, key: &str) -> Option<i64>
pub fn get_integer(&self, key: &str) -> Option<i64>
Helper method to get integer value from config
Sourcepub fn as_hashmap(&self) -> HashMap<String, Value>
pub fn as_hashmap(&self) -> HashMap<String, Value>
Get the full config as HashMap for backwards compatibility
Sourcepub fn get_config_or_env(&self, key: &str) -> Option<String>
pub fn get_config_or_env(&self, key: &str) -> Option<String>
Get a config value with environment variable fallback
Trait Implementations§
Source§impl Clone for ActorConfig
impl Clone for ActorConfig
Source§fn clone(&self) -> ActorConfig
fn clone(&self) -> ActorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more