pub trait HttpSource: Clone + Send + Sync + 'static {
// Required method
fn build_events(
&self,
body: Bytes,
header_map: &HeaderMap,
query_parameters: &HashMap<String, String>,
path: &str,
) -> Result<Vec<Event>, ErrorMessage>;
// Provided methods
fn enrich_events(
&self,
_events: &mut [Event],
_request_path: &str,
_headers_config: &HeaderMap,
_query_parameters: &HashMap<String, String>,
_source_ip: Option<&SocketAddr>,
) { ... }
fn decode(
&self,
encoding_header: Option<&str>,
body: Bytes,
) -> Result<Bytes, ErrorMessage> { ... }
fn run(
self,
address: SocketAddr,
path: &str,
method: HttpMethod,
response_code: StatusCode,
strict_path: bool,
tls: &Option<TlsEnableableConfig>,
auth: &Option<HttpSourceAuthConfig>,
cx: SourceContext,
acknowledgements: SourceAcknowledgementsConfig,
keepalive_settings: KeepaliveConfig,
) -> Result<Source> { ... }
fn enable_source_ip(&self) -> bool { ... }
}
Required Methods§
fn build_events( &self, body: Bytes, header_map: &HeaderMap, query_parameters: &HashMap<String, String>, path: &str, ) -> Result<Vec<Event>, ErrorMessage>
Provided Methods§
fn enrich_events( &self, _events: &mut [Event], _request_path: &str, _headers_config: &HeaderMap, _query_parameters: &HashMap<String, String>, _source_ip: Option<&SocketAddr>, )
fn decode( &self, encoding_header: Option<&str>, body: Bytes, ) -> Result<Bytes, ErrorMessage>
fn run( self, address: SocketAddr, path: &str, method: HttpMethod, response_code: StatusCode, strict_path: bool, tls: &Option<TlsEnableableConfig>, auth: &Option<HttpSourceAuthConfig>, cx: SourceContext, acknowledgements: SourceAcknowledgementsConfig, keepalive_settings: KeepaliveConfig, ) -> Result<Source>
fn enable_source_ip(&self) -> bool
Object Safety§
This trait is not object safe.