vmimport

package
v1.34.7-cluster Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStream

func ParseStream(req *http.Request, callback func(rows []Row) error) error

ParseStream parses /api/v1/import lines from req and calls callback for the parsed rows.

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

callback shouldn't hold rows after returning.

Types

type Row

type Row struct {
	Tags       []Tag
	Values     []float64
	Timestamps []int64
}

Row is a single row from `/api/v1/import` request.

type Rows

type Rows struct {
	Rows []Row
	// contains filtered or unexported fields
}

Rows contains parsed rows from `/api/v1/import` request.

func (*Rows) Reset

func (rs *Rows) Reset()

Reset resets rs.

func (*Rows) Unmarshal

func (rs *Rows) Unmarshal(s string)

Unmarshal unmarshals influx line protocol rows from s.

See https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/

s must be unchanged until rs is in use.

type Tag

type Tag struct {
	Key   []byte
	Value []byte
}

Tag represents `/api/v1/import` tag.

Jump to

Keyboard shortcuts

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