points

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MB = 1048576

Variables

This section is empty.

Functions

func Glue added in v0.8.0

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

func ReadBinary added in v0.10.0

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

func ReadFromFile added in v0.10.0

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

func ReadPlain added in v0.10.0

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 added in v0.7.1

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 ParsePickle

func ParsePickle(pkt []byte) ([]*Points, error)

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 added in v0.10.0

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

func (*Points) WriteTo added in v0.9.0

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