#[non_exhaustive]pub struct InfluxiveWriterConfig {
pub batch_duration: Duration,
pub batch_buffer_size: usize,
pub backend: Arc<dyn BackendFactory + Send + Sync>,
}Expand description
InfluxDB metric writer configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.batch_duration: DurationMax time span over which metric writes will be buffered before
actually being written to InfluxDB to facilitate batching.
Defaults to 100ms.
batch_buffer_size: usizeThe size of the metric write batch buffer. If a metric to be
written goes beyond this buffer, the batch will be sent early.
If the buffer is again full before the previous batch finishes
sending, the metric will be ignored and a trace will be written
at “debug” level.
Defaults to 4096.
backend: Arc<dyn BackendFactory + Send + Sync>Backend driving this writer instance. This is currently driven by the influxdb crate, but that is subject to change without notice.
Implementations§
Source§impl InfluxiveWriterConfig
impl InfluxiveWriterConfig
Sourcepub fn create_with_influx_file(path: PathBuf) -> InfluxiveWriterConfig
pub fn create_with_influx_file(path: PathBuf) -> InfluxiveWriterConfig
Construct a Config that uses a LineProtocolFileBackendFactory
Sourcepub fn with_batch_duration(
self,
batch_duration: Duration,
) -> InfluxiveWriterConfig
pub fn with_batch_duration( self, batch_duration: Duration, ) -> InfluxiveWriterConfig
Sourcepub fn with_batch_buffer_size(
self,
batch_buffer_size: usize,
) -> InfluxiveWriterConfig
pub fn with_batch_buffer_size( self, batch_buffer_size: usize, ) -> InfluxiveWriterConfig
Sourcepub fn with_backend(
self,
backend: Arc<dyn BackendFactory + Send + Sync>,
) -> InfluxiveWriterConfig
pub fn with_backend( self, backend: Arc<dyn BackendFactory + Send + Sync>, ) -> InfluxiveWriterConfig
Trait Implementations§
Source§impl Clone for InfluxiveWriterConfig
impl Clone for InfluxiveWriterConfig
Source§fn clone(&self) -> InfluxiveWriterConfig
fn clone(&self) -> InfluxiveWriterConfig
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 InfluxiveWriterConfig
impl Debug for InfluxiveWriterConfig
Source§impl Default for InfluxiveWriterConfig
impl Default for InfluxiveWriterConfig
Source§fn default() -> InfluxiveWriterConfig
fn default() -> InfluxiveWriterConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InfluxiveWriterConfig
impl !RefUnwindSafe for InfluxiveWriterConfig
impl Send for InfluxiveWriterConfig
impl Sync for InfluxiveWriterConfig
impl Unpin for InfluxiveWriterConfig
impl !UnwindSafe for InfluxiveWriterConfig
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