pub struct CollatorConfig {
pub emit_messages: bool,
pub emit_exchanges: bool,
pub max_buf_size: usize,
pub timeout_ns: u64,
pub max_body_size: usize,
}Expand description
Configuration for what the collator emits
Fields§
§emit_messages: boolEmit Message events when individual requests/responses are parsed
emit_exchanges: boolEmit Exchange events when request/response pairs complete
max_buf_size: usizeMaximum buffer size per chunk
timeout_ns: u64Connection timeout for cleanup in nanoseconds
max_body_size: usizeMaximum accumulated body size per direction before the connection is reset. Prevents unbounded memory growth from stalled or malicious connections. Default: 10 MiB.
Implementations§
Source§impl CollatorConfig
impl CollatorConfig
Sourcepub fn messages_only() -> Self
pub fn messages_only() -> Self
Create config that only emits messages (for immediate adjudication)
Sourcepub fn exchanges_only() -> Self
pub fn exchanges_only() -> Self
Create config that only emits exchanges (for monitoring/APM)
Trait Implementations§
Source§impl Clone for CollatorConfig
impl Clone for CollatorConfig
Source§fn clone(&self) -> CollatorConfig
fn clone(&self) -> CollatorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollatorConfig
impl Debug for CollatorConfig
Auto Trait Implementations§
impl Freeze for CollatorConfig
impl RefUnwindSafe for CollatorConfig
impl Send for CollatorConfig
impl Sync for CollatorConfig
impl Unpin for CollatorConfig
impl UnsafeUnpin for CollatorConfig
impl UnwindSafe for CollatorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more