pub struct EventSender { /* private fields */ }Expand description
Event sender handle for external components
Implementations§
Source§impl EventSender
impl EventSender
Sourcepub fn send(&self, event: StreamingEvent) -> Result<(), StreamError>
pub fn send(&self, event: StreamingEvent) -> Result<(), StreamError>
Send an event
Sourcepub fn send_security_event(
&self,
event: CyberEvent,
source: String,
) -> Result<(), StreamError>
pub fn send_security_event( &self, event: CyberEvent, source: String, ) -> Result<(), StreamError>
Send security event
Sourcepub fn send_reasoning_result(
&self,
actions: Vec<SecurityAction>,
execution_time_ms: u64,
event_count: usize,
) -> Result<(), StreamError>
pub fn send_reasoning_result( &self, actions: Vec<SecurityAction>, execution_time_ms: u64, event_count: usize, ) -> Result<(), StreamError>
Send reasoning result
Sourcepub fn send_anomaly(
&self,
score: f64,
threshold: f64,
metric: String,
) -> Result<(), StreamError>
pub fn send_anomaly( &self, score: f64, threshold: f64, metric: String, ) -> Result<(), StreamError>
Send anomaly detection result
Sourcepub fn send_metrics(
&self,
cpu_usage: f64,
memory_usage: f64,
active_connections: u32,
) -> Result<(), StreamError>
pub fn send_metrics( &self, cpu_usage: f64, memory_usage: f64, active_connections: u32, ) -> Result<(), StreamError>
Send system metrics
Trait Implementations§
Source§impl Clone for EventSender
impl Clone for EventSender
Source§fn clone(&self) -> EventSender
fn clone(&self) -> EventSender
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 moreAuto Trait Implementations§
impl Freeze for EventSender
impl RefUnwindSafe for EventSender
impl Send for EventSender
impl Sync for EventSender
impl Unpin for EventSender
impl UnwindSafe for EventSender
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