tsdbutil

package
v0.0.0-...-cb7f320 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedSeriesIterator

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

BufferedSeriesIterator wraps an iterator with a look-back buffer.

func NewBuffer

func NewBuffer(it tsdb.SeriesIterator, delta int64) *BufferedSeriesIterator

NewBuffer returns a new iterator that buffers the values within the time range of the current element and the duration of delta before.

func (*BufferedSeriesIterator) At

At returns the current element of the iterator.

func (*BufferedSeriesIterator) Buffer

Buffer returns an iterator over the buffered data.

func (*BufferedSeriesIterator) Err

func (b *BufferedSeriesIterator) Err() error

Err returns the last encountered error.

func (*BufferedSeriesIterator) Next

func (b *BufferedSeriesIterator) Next() bool

Next advances the iterator to the next element.

func (*BufferedSeriesIterator) PeekBack

func (b *BufferedSeriesIterator) PeekBack() (t int64, v float64, ok bool)

PeekBack returns the previous element of the iterator. If there is none buffered, ok is false.

func (*BufferedSeriesIterator) Seek

func (b *BufferedSeriesIterator) Seek(t int64) bool

Seek advances the iterator to the element at time t or greater.

Jump to

Keyboard shortcuts

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