Struct re_log_types::DataTableBatcherConfig
source · pub struct DataTableBatcherConfig {
pub flush_tick: Duration,
pub flush_num_bytes: u64,
pub flush_num_rows: u64,
pub max_commands_in_flight: Option<u64>,
pub max_tables_in_flight: Option<u64>,
pub hooks: BatcherHooks,
}
Expand description
Defines the different thresholds of the associated DataTableBatcher
.
See Self::default
and Self::from_env
.
Fields§
§flush_tick: Duration
Duration of the periodic tick.
flush_num_bytes: u64
Flush if the accumulated payload has a size in bytes equal or greater than this.
The resulting DataTable
might be larger than flush_num_bytes
!
flush_num_rows: u64
Flush if the accumulated payload has a number of rows equal or greater than this.
max_commands_in_flight: Option<u64>
Size of the internal channel of commands.
Unbounded if left unspecified.
max_tables_in_flight: Option<u64>
Size of the internal channel of DataTable
s.
Unbounded if left unspecified.
hooks: BatcherHooks
Callbacks you can install on the DataTableBatcher
.
Implementations§
source§impl DataTableBatcherConfig
impl DataTableBatcherConfig
sourcepub const ENV_FLUSH_TICK: &'static str = "RERUN_FLUSH_TICK_SECS"
pub const ENV_FLUSH_TICK: &'static str = "RERUN_FLUSH_TICK_SECS"
Environment variable to configure Self::flush_tick
.
sourcepub const ENV_FLUSH_NUM_BYTES: &'static str = "RERUN_FLUSH_NUM_BYTES"
pub const ENV_FLUSH_NUM_BYTES: &'static str = "RERUN_FLUSH_NUM_BYTES"
Environment variable to configure Self::flush_num_bytes
.
sourcepub const ENV_FLUSH_NUM_ROWS: &'static str = "RERUN_FLUSH_NUM_ROWS"
pub const ENV_FLUSH_NUM_ROWS: &'static str = "RERUN_FLUSH_NUM_ROWS"
Environment variable to configure Self::flush_num_rows
.
sourcepub fn from_env() -> Result<Self, DataTableBatcherError>
pub fn from_env() -> Result<Self, DataTableBatcherError>
Creates a new DataTableBatcherConfig
using the default values, optionally overridden
through the environment.
See Self::apply_env
.
sourcepub fn apply_env(&self) -> Result<Self, DataTableBatcherError>
pub fn apply_env(&self) -> Result<Self, DataTableBatcherError>
Returns a copy of self
, overriding existing fields with values from the environment if
they are present.
See Self::ENV_FLUSH_TICK
, Self::ENV_FLUSH_NUM_BYTES
, Self::ENV_FLUSH_NUM_BYTES
.
Trait Implementations§
source§impl Clone for DataTableBatcherConfig
impl Clone for DataTableBatcherConfig
source§fn clone(&self) -> DataTableBatcherConfig
fn clone(&self) -> DataTableBatcherConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DataTableBatcherConfig
impl Debug for DataTableBatcherConfig
source§impl Default for DataTableBatcherConfig
impl Default for DataTableBatcherConfig
source§impl PartialEq for DataTableBatcherConfig
impl PartialEq for DataTableBatcherConfig
source§fn eq(&self, other: &DataTableBatcherConfig) -> bool
fn eq(&self, other: &DataTableBatcherConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DataTableBatcherConfig
Auto Trait Implementations§
impl Freeze for DataTableBatcherConfig
impl !RefUnwindSafe for DataTableBatcherConfig
impl Send for DataTableBatcherConfig
impl Sync for DataTableBatcherConfig
impl Unpin for DataTableBatcherConfig
impl !UnwindSafe for DataTableBatcherConfig
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more