chunk

package
v0.0.0-...-40e4417 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Chunk time series

func NewChunk

func NewChunk(t time.Time) *Chunk

NewChunk return new series with second precision

func NewMilliChunk

func NewMilliChunk(t time.Time) *Chunk

NewMilliChunk return new series with millisecond precision

func (*Chunk) Finish

func (c *Chunk) Finish()

Finish finish a stream

func (*Chunk) Iter

func (c *Chunk) Iter() (*Iter, error)

Iter return an iterator

func (*Chunk) MarshalBinary

func (c *Chunk) MarshalBinary() ([]byte, error)

MarshalBinary impl encoding.BinaryMarshaler

func (*Chunk) Push

func (c *Chunk) Push(t int64, vbits uint64)

Push push timestamp and value bits

func (*Chunk) PushTime

func (c *Chunk) PushTime(t time.Time, vbits uint64)

PushTime push time.Time and value bits

func (*Chunk) UnmarshalBinary

func (c *Chunk) UnmarshalBinary(data []byte) error

UnmarshalBinary impl encoding.BinaryUnmarshaler

type Iter

type Iter struct {
	Stat struct {
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

Iter stream iter

func NewIter

func NewIter(data []byte, precision time.Duration) (*Iter, error)

NewIter return new iterator with given data

func (*Iter) Err

func (i *Iter) Err() error

Err return last error

func (*Iter) Next

func (i *Iter) Next() bool

Next try read next value

func (*Iter) Point

func (i *Iter) Point() (int64, uint64)

Point return current point

func (*Iter) PointStat

func (i *Iter) PointStat(b bool)

PointStat if we stat the points

func (*Iter) PointTime

func (i *Iter) PointTime(ts int64) time.Time

PointTime return point time from timestamp

func (*Iter) Total

func (i *Iter) Total() uint64

Total total points

Jump to

Keyboard shortcuts

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