Skip to main content

CaptureConfig

Struct CaptureConfig 

Source
pub struct CaptureConfig {
    pub brokers: Vec<String>,
    pub topic: String,
    pub redact: bool,
    pub tls: Option<CaptureTlsConfig>,
    pub max_inflight: usize,
    pub max_attempts: u32,
    pub backoff_ms: u64,
    pub wal_dir: Option<String>,
    pub wal_max_bytes: u64,
}
Expand description

Full-fidelity traffic capture settings: where to send the captured exchange stream. This is plain data (no broker types), so the config crate stays independent of any Kafka client; the binary builds the producer from it.

Fields§

§brokers: Vec<String>

The Kafka bootstrap brokers (host:port), at least one.

§topic: String

The topic each captured exchange envelope is produced to.

§redact: bool

Whether to redact the Authorization header from the captured stream (default true). The capture stream is privileged and carries bodies and values verbatim, so credentials are stripped unless explicitly kept.

§tls: Option<CaptureTlsConfig>

TLS to the brokers, or None for a plaintext broker connection.

§max_inflight: usize

The most records in flight (buffered + retrying) at once before a produce is dropped, bounding memory. Higher = fewer drops under load, more memory.

§max_attempts: u32

Total send attempts per record before giving up. Higher = better delivery odds across a transient broker blip, at the cost of more retry work.

§backoff_ms: u64

The first retry backoff in milliseconds; it doubles after each failure.

§wal_dir: Option<String>

Directory for the durable on-disk spill buffer, or None for in-memory best-effort. Set it for at-least-once capture that survives a restart: records persist to a write-ahead log here and replay until acknowledged.

§wal_max_bytes: u64

Cap on undelivered bytes in the spill buffer before new records are dropped (only meaningful with wal_dir). Bounds disk like max_inflight bounds memory.

Trait Implementations§

Source§

impl Clone for CaptureConfig

Source§

fn clone(&self) -> CaptureConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CaptureConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CaptureConfig

Source§

impl PartialEq for CaptureConfig

Source§

fn eq(&self, other: &CaptureConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CaptureConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.