pub trait IntakeSource: Send + Sync {
// Required methods
fn source_type(&self) -> IntakeSourceType;
fn process(&self, payload: &[u8]) -> IntakeResult<Vec<IntakeEvent>>;
fn validate(&self, payload: &[u8]) -> IntakeResult<()>;
}Expand description
Trait for implementing intake sources
Required Methods§
Sourcefn source_type(&self) -> IntakeSourceType
fn source_type(&self) -> IntakeSourceType
Get the source type
Sourcefn process(&self, payload: &[u8]) -> IntakeResult<Vec<IntakeEvent>>
fn process(&self, payload: &[u8]) -> IntakeResult<Vec<IntakeEvent>>
Process incoming data and extract potential issues
Sourcefn validate(&self, payload: &[u8]) -> IntakeResult<()>
fn validate(&self, payload: &[u8]) -> IntakeResult<()>
Validate the incoming data format