points

package
v0.14.1-0...-915d78e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MB = 1048576

Variables

This section is empty.

Functions

func Glue

func Glue(exit chan bool, in chan *Points, chunkSize int, chunkTimeout time.Duration, callback func([]byte))

func ReadBinary

func ReadBinary(r io.Reader, callback func(*Points)) error

func ReadFromFile

func ReadFromFile(filename string, callback func(*Points)) error

func ReadPlain

func ReadPlain(r io.Reader, callback func(*Points)) error

Types

type Point

type Point struct {
	Value     float64
	Timestamp int64
}

Point value/time pair

type Points

type Points struct {
	Metric string
	Data   []Point
}

Points from carbon clients

func New

func New() *Points

New creates new instance of Points

func NowPoint

func NowPoint(metric string, value float64) *Points

NowPoint create OnePoint with now timestamp

func OnePoint

func OnePoint(metric string, value float64, timestamp int64) *Points

OnePoint create Points instance with single point

func ParseText

func ParseText(line string) (*Points, error)

ParseText parse text protocol Point

host.Point.value 42 1422641531\n

func (*Points) Add

func (p *Points) Add(value float64, timestamp int64) *Points

Add value/timestamp pair to points

func (*Points) Append

func (p *Points) Append(onePoint Point) *Points

Append point

func (*Points) Copy

func (p *Points) Copy() *Points

Copy returns copy of object

func (*Points) Eq

func (p *Points) Eq(other *Points) bool

Eq points check

func (*Points) WriteBinaryTo

func (p *Points) WriteBinaryTo(w io.Writer) (n int, err error)

func (*Points) WriteTo

func (p *Points) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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