graphite

package
v1.64.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseStream added in v1.34.0

func ParseStream(r io.Reader, callback func(rows []Row) error) error

ParseStream parses Graphite lines from r and calls callback for the parsed rows.

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

callback shouldn't hold rows after returning.

Types

type Row

type Row struct {
	Metric    string
	Tags      []Tag
	Value     float64
	Timestamp int64
}

Row is a single graphite row.

func (*Row) UnmarshalMetricAndTags added in v1.47.0

func (r *Row) UnmarshalMetricAndTags(s string, tagsPool []Tag) ([]Tag, error)

UnmarshalMetricAndTags unmarshals metric and optional tags from s.

type Rows

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

Rows contains parsed graphite rows.

func (*Rows) Reset

func (rs *Rows) Reset()

Reset resets rs.

func (*Rows) Unmarshal

func (rs *Rows) Unmarshal(s string)

Unmarshal unmarshals grahite plaintext protocol rows from s.

See https://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol

s shouldn't be modified when rs is in use.

type Tag

type Tag struct {
	Key   string
	Value string
}

Tag is a graphite tag.

Jump to

Keyboard shortcuts

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