influx

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingMetricName = errors.New("missing_metric_name")
	ErrMissingWhiteSpace = errors.New("missing_whitespace")
	ErrBadTags           = errors.New("bad_tags")
	ErrBadFields         = errors.New("bad_fields")
	ErrBadTimestamp      = errors.New("bad_timestamp")
)

Functions

func Parse

func Parse(req *http.Request, enrichedTags tag.Tags, namespace string, limits *models.Limits) (*metric.BrokerBatchRows, error)

Parse parses influxdb line protocol data to LinDB pb prometheus. https://docs.influxdata.com/influxdb/v2.0/write-data/developer-tools/api/#example-api-write-request

func PutChunkReader

func PutChunkReader(cr *ChunkReader)

PutChunkReader puts chunk-reader back to the pool

Types

type ChunkReader

type ChunkReader struct {
	// contains filtered or unexported fields
}

ChunkReader reads multi lines delimited by '\n' to prevent using ioutil.ReadAll, it implements

HasNext() bool (skip empty lines) Next() []byte Error() error Reset()

func GetChunkReader

func GetChunkReader(r io.Reader) *ChunkReader

GetChunkReader picks a cached chunk-reader from the pool

func (*ChunkReader) Error

func (cr *ChunkReader) Error() error

func (*ChunkReader) HasNext

func (cr *ChunkReader) HasNext() bool

func (*ChunkReader) Next

func (cr *ChunkReader) Next() []byte

func (*ChunkReader) Reset

func (cr *ChunkReader) Reset(r io.Reader)

Jump to

Keyboard shortcuts

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