Trait usiem::components::SiemComponent
source · pub trait SiemComponent: Send {
fn set_id(&mut self, id: u64);
fn local_channel(&self) -> Sender<SiemMessage>;
fn set_log_channel(
&mut self,
sender: Sender<SiemLog>,
receiver: Receiver<SiemLog>
);
fn set_kernel_sender(&mut self, sender: Sender<SiemMessage>);
fn run(&mut self);
fn set_storage(&mut self, conn: Box<dyn SiemComponentStateStorage>);
fn capabilities(&self) -> SiemComponentCapabilities;
fn duplicate(&self) -> Box<dyn SiemComponent>;
fn set_datasets(&mut self, datasets: DatasetHolder);
fn id(&self) -> u64 { ... }
fn name(&self) -> &str { ... }
}
Required Methods
fn set_id(&mut self, id: u64)
sourcefn local_channel(&self) -> Sender<SiemMessage>
fn local_channel(&self) -> Sender<SiemMessage>
Get the channel to this component
sourcefn set_log_channel(
&mut self,
sender: Sender<SiemLog>,
receiver: Receiver<SiemLog>
)
fn set_log_channel(
&mut self,
sender: Sender<SiemLog>,
receiver: Receiver<SiemLog>
)
Sets the channel of this component. It’s the kernel who sets the channel
sourcefn set_kernel_sender(&mut self, sender: Sender<SiemMessage>)
fn set_kernel_sender(&mut self, sender: Sender<SiemMessage>)
Sets the channel to communicate with the kernel.
sourcefn run(&mut self)
fn run(&mut self)
Execute the logic of this component in an infinite loop. Must be stopped using Commands sent using the channel.
sourcefn set_storage(&mut self, conn: Box<dyn SiemComponentStateStorage>)
fn set_storage(&mut self, conn: Box<dyn SiemComponentStateStorage>)
Allow to store information about this component like the state or conigurations.
sourcefn capabilities(&self) -> SiemComponentCapabilities
fn capabilities(&self) -> SiemComponentCapabilities
Capabilities and actions that can be performed by this component
sourcefn duplicate(&self) -> Box<dyn SiemComponent>
fn duplicate(&self) -> Box<dyn SiemComponent>
Allows the Kernel to duplicate this component
sourcefn set_datasets(&mut self, datasets: DatasetHolder)
fn set_datasets(&mut self, datasets: DatasetHolder)
Initialize the component with the datasets before executing run