MCPcopy Create free account
hub / github.com/bitdriftlabs/pulse / Batch

Interface Batch

pulse-metrics/src/batch.rs:33–39  ·  view source on GitHub ↗

A Batch is a collection of items that are collected over a period of time.

Source from the content-addressed store, hash-verified

31
32// A Batch is a collection of items that are collected over a period of time.
33pub trait Batch<I> {
34 // Push an item onto the batch. If the batch is complete, return the size.
35 fn push(&mut self, item: impl Iterator<Item = I>) -> Option<usize>;
36
37 // Finish the batch. Will only be called if there is a batch fill timeout. Return the size.
38 fn finish(&mut self) -> usize;
39}
40
41// A combined batch and its size. Used for construction of both pending batches as well as entries
42// in the LIFO/FIFO queue.

Callers

nothing calls this directly

Implementers 3

batch_test.rspulse-metrics/src/batch_test.rs
wire.rspulse-metrics/src/pipeline/outflow/wir
remote_write.rspulse-metrics/src/pipeline/outflow/htt

Calls

no outgoing calls

Tested by

no test coverage detected