fn run(&mut self) {
        loop {
            let rcv_action = (&self.local_chnl_rcv).try_recv();
            match rcv_action {
                Ok(msg) => match msg {
                    SiemMessage::Command(id, cmd) => match cmd {
                        SiemFunctionCall::STOP_COMPONENT(_n) => return,
                        SiemFunctionCall::OTHER(name, _params) => {
                            if name == "LIST_PARSERS" {
                                let _r = self.kernel_sender.send(self.list_parsers(id));
                            }
                        }
                        _ => {}
                    },
                    SiemMessage::Log(msg) => {
                        self.parse_log(msg);
                    }
                    _ => {}
                },
                Err(e) => match e {
                    TryRecvError::Empty => {
                        std::thread::sleep(std::time::Duration::from_millis(10));
                    }
                    TryRecvError::Disconnected => return,
                },
            }

            let rcv_log = (&self.log_receiver).try_recv();
            match rcv_log {
                Ok(log) => {
                    self.parse_log(log);
                }
                Err(e) => match e {
                    TryRecvError::Empty => {
                        continue;
                    }
                    TryRecvError::Disconnected => return,
                },
            }
            loop {
                let log = self.cache.pop();
                match log {
                    Some(log) => {
                        self.parse_log(log);
                    }
                    None => {
                        break;
                    }
                }
            }
        }
    }
/// Execute the logic of this component in an infinite loop. Must be stopped using Commands sent using the channel.
Execute the logic of this component in an infinite loop. Must be stopped using Commands sent using the channel.
Execute the logic of this component in an infinite loop . Must be stopped using Commands sent using the channel .
fn run(&mut self) {
        loop {
            let rcv_action = (&self.local_chnl_rcv).try_recv();
            match rcv_action {
                Ok(msg) => match msg {
                    SiemMessage::Command(id, cmd) => match cmd {
                        SiemFunctionCall::STOP_COMPONENT(_n) => return,
                        SiemFunctionCall::OTHER(name, _params) => {
                            if name == "LIST_PARSERS" {
                                let _r = self.kernel_sender.send(self.list_parsers(id));
                            }
                        }
                        _ => {}
                    },
                    SiemMessage::Log(msg) => {
                        self.parse_log(msg);
                    }
                    _ => {}
                },
                Err(e) => match e {
                    TryRecvError::Empty => {
                        std::thread::sleep(std::time::Duration::from_millis(10));
                    }
                    TryRecvError::Disconnected => return,
                },
            }
            let rcv_log = (&self.log_receiver).try_recv();
            match rcv_log {
                Ok(log) => {
                    self.parse_log(log);
                }
                Err(e) => match e {
                    TryRecvError::Empty => {
                        continue;
                    }
                    TryRecvError::Disconnected => return,
                },
            }
            loop {
                let log = self.cache.pop();
                match log {
                    Some(log) => {
                        self.parse_log(log);
                    }
                    None => {
                        break;
                    }
                }
            }
        }
    }
fn run ( & mut self ) { loop { let rcv_action = ( & self . local_chnl_rcv ) . try_recv ( ) ; match rcv_action { Ok ( msg ) => match msg { SiemMessage :: Command ( id , cmd ) => match cmd { SiemFunctionCall :: STOP_COMPONENT ( _n ) => return , SiemFunctionCall :: OTHER ( name , _params ) => { if name == " " { let _r = self . kernel_sender . send ( self . list_parsers ( id ) ) ; } } _ => { } } , SiemMessage :: Log ( msg ) => { self . parse_log ( msg ) ; } _ => { } } , Err ( e ) => match e { TryRecvError :: Empty => { std :: thread :: sleep ( std :: time :: Duration :: from_millis ( 10 ) ) ; } TryRecvError :: Disconnected => return , } , } let rcv_log = ( & self . log_receiver ) . try_recv ( ) ; match rcv_log { Ok ( log ) => { self . parse_log ( log ) ; } Err ( e ) => match e { TryRecvError :: Empty => { continue ; } TryRecvError :: Disconnected => return , } , } loop { let log = self . cache . pop ( ) ; match log { Some ( log ) => { self . parse_log ( log ) ; } None => { break ; } } } } }
Execute the logic of this component in an infinite loop.
Execute the logic of this component in an infinite loop .
&mut self
&mut self