stream

package
v1.100.1-cluster Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(r io.Reader, isGzip bool, callback func(block *Block) error) error

Parse parses /api/v1/import/native lines from req and calls callback for parsed blocks.

The callback can be called concurrently multiple times for streamed data from r.

callback shouldn't hold block after returning.

Types

type Block

type Block struct {
	MetricName storage.MetricName
	Values     []float64
	Timestamps []int64
}

Block is a single block from `/api/v1/import/native` request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL