native

package
v1.57.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStream

func ParseStream(req *http.Request, callback func(block *Block) error) error

ParseStream 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 req.

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