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

This is the flow of the Loki ingestion. +––––+ | bytes | +––––+ | +–––––––––––+–––––––––––+ | | | | JSON content type | PB content type | +–––––––––––+–––––––––––+ | | | | JsonStreamItem | PbStreamItem | | stream: serde_json | stream: adapter | +–––––––––––+–––––––––––+ | | | | MiddleItem<serde_json> | MiddleItem | +–––––––––––+–––––––––––+ \ / \ / \ / +–––––––––––+ | MiddleItem | +–––––––––––+ | +––––––––+––––––––+ | | +——————+ +———————+ | LokiRawItem | | LokiPipelineItem | +——————+ +———————+ | | +——————+ +———————+ | Loki ingest | | run_pipeline | +——————+ +———————+