Struct Atif Dispatcher
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub struct AtifDispatcher {
pub host: Arc<dyn ObservabilityHost>,
pub config: AtifSectionConfig,
pub agents: HashMap<Uuid, ManagedAtifExporter>,
pub scope_owners: HashMap<Uuid, Uuid>,
pub scope_subscribers: HashMap<Uuid, String>,
pub fatal_error: Option<String>,
pub runtime_failures: Vec<RuntimeDiagnostic>,
pub validated_sinks: HashSet<SinkLabel>,
}
Fields
host: Arc<dyn ObservabilityHost>
config: AtifSectionConfig
agents: HashMap<Uuid, ManagedAtifExporter>
scope_owners: HashMap<Uuid, Uuid>
scope_subscribers: HashMap<Uuid, String>
fatal_error: Option<String>
Fatal dispatcher errors (subscriber registration, payload serialization) that cannot be isolated to a single sink. Once set, the dispatcher stops observing further events.
runtime_failures: Vec<RuntimeDiagnostic>
validated_sinks: HashSet<SinkLabel>
Implementations
impl AtifDispatcher
impl AtifDispatcher
new
pub fn new(config: AtifSectionConfig, host: Arc<dyn ObservabilityHost>) -> Self
observe_global
pub fn observe_global(
&mut self,
event: &Event,
subscriber_prefix: &str,
state: Arc<Mutex<Self>>,
storage: AtifStorageList,
) -> Option<(PendingAtifWrite, Vec<SinkLabel>)>
observe_descendant_from_global
pub fn observe_descendant_from_global(
&mut self,
event: &Event,
) -> Option<(PendingAtifWrite, Vec<SinkLabel>)>
observe_scope
pub fn observe_scope(
&mut self,
event: &Event,
agent_uuid: Uuid,
) -> Option<(PendingAtifWrite, Vec<SinkLabel>)>
complete_scope_write
pub fn complete_scope_write(
&mut self,
agent_uuid: Uuid,
results: Vec<(SinkLabel, Result<()>)>,
) -> Option<(Uuid, String)>
flush_open_agents
pub fn flush_open_agents(&mut self) -> AtifFlushWork
observed_events
pub fn observed_events(&self, agent_uuid: Uuid) -> Vec<Event>
last_error_result
pub fn last_error_result(&self) -> Result<()>
agent_info
pub fn agent_info(&self) -> AtifAgentInfo
prepare_destination
pub fn prepare_destination(
&self,
session_id: &str,
metadata: Option<&Json>,
) -> Result<(String, Option<PathBuf>, Option<PathBuf>), String>
sink_targets
pub fn sink_targets(&self) -> Vec<SinkLabel>
record_runtime_failure
pub fn record_runtime_failure(
&mut self,
code: &str,
field: Option<String>,
message: String,
session_id: Option<String>,
)