pub trait TcpSource: Clone + Send + Sync + 'static{
type Error: From<Error> + StreamDecodingError + Debug + Display + Send + Unpin;
type Item: Into<SmallVec<[Event; 1]>> + Send + Unpin;
type Decoder: Decoder<Item = (Self::Item, usize), Error = Self::Error> + Send + 'static;
type Acker: TcpSourceAcker + Send;
// Required methods
fn decoder(&self) -> Self::Decoder;
fn build_acker(&self, item: &[Self::Item]) -> Self::Acker;
// Provided methods
fn handle_events(&self, _events: &mut [Event], _host: SocketAddr) { ... }
fn run(
self,
addr: SocketListenAddr,
keepalive: Option<TcpKeepaliveConfig>,
shutdown_timeout_secs: Duration,
tls: MaybeTlsSettings,
tls_client_metadata_key: Option<OwnedValuePath>,
receive_buffer_bytes: Option<usize>,
max_connection_duration_secs: Option<u64>,
cx: SourceContext,
acknowledgements: SourceAcknowledgementsConfig,
max_connections: Option<u32>,
allowlist: Option<Vec<IpNet>>,
source_name: &'static str,
log_namespace: LogNamespace,
) -> Result<Source> { ... }
}
Required Associated Types§
type Error: From<Error> + StreamDecodingError + Debug + Display + Send + Unpin
type Item: Into<SmallVec<[Event; 1]>> + Send + Unpin
type Decoder: Decoder<Item = (Self::Item, usize), Error = Self::Error> + Send + 'static
type Acker: TcpSourceAcker + Send
Required Methods§
fn decoder(&self) -> Self::Decoder
fn build_acker(&self, item: &[Self::Item]) -> Self::Acker
Provided Methods§
fn handle_events(&self, _events: &mut [Event], _host: SocketAddr)
fn run( self, addr: SocketListenAddr, keepalive: Option<TcpKeepaliveConfig>, shutdown_timeout_secs: Duration, tls: MaybeTlsSettings, tls_client_metadata_key: Option<OwnedValuePath>, receive_buffer_bytes: Option<usize>, max_connection_duration_secs: Option<u64>, cx: SourceContext, acknowledgements: SourceAcknowledgementsConfig, max_connections: Option<u32>, allowlist: Option<Vec<IpNet>>, source_name: &'static str, log_namespace: LogNamespace, ) -> Result<Source>
Object Safety§
This trait is not object safe.