Trait usiem::components::common::SiemComponentStateStorage[][src]

pub trait SiemComponentStateStorage: DynClone + Send {
    fn get_value(&self, key: Cow<'static, str>) -> Result<String, StorageError>;
fn set_value(
        &mut self,
        key: Cow<'static, str>,
        value: String,
        replace: bool
    ) -> Result<(), StorageError>;
fn get_file(&self, filepath: String) -> Result<Vec<u8>, StorageError>;
fn get_file_size(&self, filepath: String) -> Result<u64, StorageError>;
fn get_file_range(
        &self,
        filepath: String,
        start: u64,
        end: u64
    ) -> Result<Vec<u8>, StorageError>;
fn set_file(
        &mut self,
        filepath: String,
        content: Vec<u8>
    ) -> Result<(), StorageError>;
fn set_file_range(
        &mut self,
        filepath: String,
        content: Vec<u8>,
        start: u64,
        end: u64
    ) -> Result<(), StorageError>;
fn duplicate(&self) -> Box<dyn SiemComponentStateStorage>; }

Required methods

Read a key value from the database

Write to the database a key/value pair

Get a file

Get the size of a file

Get a file part

Sets the content of a file

Sets the content of a file

Implementors