Skip to main content

records_into_work_batch

Function records_into_work_batch 

Source
pub fn records_into_work_batch<T: CommitToken>(
    records: Vec<Record>,
    commit_tokens: Vec<T>,
) -> WorkBatch<T>
Available on crate features worker-batch or worker-pool or worker only.
Expand description

Drain accumulated Records into a WorkBatch for push-ingest sources.

Push-ingest transports (HTTP, gRPC) accumulate Records via a BatchAccumulator<Record>, then bridge the drained block to the engine’s canonical WorkBatch currency. The commit_tokens are supplied by the caller because the push source owns the ack (an HTTP responder, a gRPC stream slot) – the accumulator carries only the payload records.