Skip to main content

extract_item

Function extract_item 

Source
fn extract_item<T>(
    content_type: ContentType,
    bytes: Bytes,
) -> Result<Box<dyn Iterator<Item = T>>>
where LokiMiddleItem<Value>: Into<T>, LokiMiddleItem<Vec<LabelPairAdapter>>: Into<T>,
Expand description

Extract Loki entries from the supported wire format into the caller’s destination type.

JSON push bodies become LokiMiddleItem<VrlValue>, protobuf push bodies become LokiMiddleItem<Vec<LabelPairAdapter>>, and the generic Into<T> conversion selects either direct-write LokiRawItem or pipeline LokiPipeline.