pub struct AggregatorConfigBuilder { /* private fields */ }Expand description
Builder for AggregatorConfig.
Implementations§
Source§impl AggregatorConfigBuilder
impl AggregatorConfigBuilder
Sourcepub fn complete_when_size(self, n: usize) -> Self
pub fn complete_when_size(self, n: usize) -> Self
Emit when bucket has N exchanges.
Sourcepub fn complete_when<F>(self, predicate: F) -> Self
pub fn complete_when<F>(self, predicate: F) -> Self
Emit when predicate returns true for the current bucket.
Sourcepub fn strategy(self, strategy: AggregationStrategy) -> Self
pub fn strategy(self, strategy: AggregationStrategy) -> Self
Override the default CollectAll aggregation strategy.
Sourcepub fn max_buckets(self, max: usize) -> Self
pub fn max_buckets(self, max: usize) -> Self
Set the maximum number of correlation key buckets. When the limit is reached, new correlation keys are rejected with an error.
Sourcepub fn bucket_ttl(self, ttl: Duration) -> Self
pub fn bucket_ttl(self, ttl: Duration) -> Self
Set the time-to-live for inactive buckets. Buckets that haven’t been updated for this duration will be evicted.
Sourcepub fn build(self) -> AggregatorConfig
pub fn build(self) -> AggregatorConfig
Build the config. Panics if no completion condition was set.
Auto Trait Implementations§
impl Freeze for AggregatorConfigBuilder
impl !RefUnwindSafe for AggregatorConfigBuilder
impl Send for AggregatorConfigBuilder
impl Sync for AggregatorConfigBuilder
impl Unpin for AggregatorConfigBuilder
impl UnsafeUnpin for AggregatorConfigBuilder
impl !UnwindSafe for AggregatorConfigBuilder
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