Trait vector::sources::util::net::TcpSource

source ·
pub trait TcpSource:
    Clone
    + Send
    + Sync
    + 'static
where <Self::Decoder as Decoder>::Item: Send,
{ 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§

source

type Error: From<Error> + StreamDecodingError + Debug + Display + Send + Unpin

source

type Item: Into<SmallVec<[Event; 1]>> + Send + Unpin

source

type Decoder: Decoder<Item = (Self::Item, usize), Error = Self::Error> + Send + 'static

source

type Acker: TcpSourceAcker + Send

Required Methods§

source

fn decoder(&self) -> Self::Decoder

source

fn build_acker(&self, item: &[Self::Item]) -> Self::Acker

Provided Methods§

source

fn handle_events(&self, _events: &mut [Event], _host: SocketAddr)

source

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.

Implementors§