Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface { // StepIter returns a StepIterator StepIter() (StepIter, error) // SeriesIter returns a SeriesIterator SeriesIter() (SeriesIter, error) // Close frees up any resources Close() error }
Block represents a group of series across a time bound
type Bounds ¶
Bounds are the time bounds
type Builder ¶
type Builder interface { AppendValue(idx int, value float64) error Build() Block AddCols(num int) error }
Builder builds a new block
func NewColumnBlockBuilder ¶
func NewColumnBlockBuilder(meta Metadata, seriesMeta []SeriesMeta) Builder
NewColumnBlockBuilder creates a new column block builder
type ColStep ¶
type ColStep struct {
// contains filtered or unexported fields
}
ColStep is a single column containing data from multiple series at a given time step
type ColumnBlockBuilder ¶
type ColumnBlockBuilder struct {
// contains filtered or unexported fields
}
ColumnBlockBuilder builds a block optimized for column iteration
func (ColumnBlockBuilder) AddCols ¶
func (cb ColumnBlockBuilder) AddCols(num int) error
AddCols adds new columns
func (ColumnBlockBuilder) AppendValue ¶
func (cb ColumnBlockBuilder) AppendValue(idx int, value float64) error
AppendValue adds a value to a column at index
func (ColumnBlockBuilder) Build ¶
func (cb ColumnBlockBuilder) Build() Block
Build extracts the block TODO: Return an immutable copy
type Series ¶
type Series struct { Meta SeriesMeta // contains filtered or unexported fields }
Series is a single series within a block
func NewSeries ¶
func NewSeries(values []float64, meta SeriesMeta) Series
NewSeries creates a new series
func (Series) ValueAtStep ¶
ValueAtStep returns the datapoint value at a step index
type SeriesIter ¶
type SeriesIter interface { Iterator // Current returns the current series for the block Current() (Series, error) // SeriesCount returns the number of series SeriesCount() int // SeriesMeta returns the metadata for each series in the block SeriesMeta() []SeriesMeta // Meta returns the metadata for the block Meta() Metadata }
SeriesIter iterates through a block horizontally
type SeriesMeta ¶
SeriesMeta is metadata data for the series
type StepIter ¶
type StepIter interface { Iterator // Current returns the current step for the block Current() (Step, error) // StepCount returns the number of steps StepCount() int // SeriesMeta returns the metadata for each series in the block SeriesMeta() []SeriesMeta // Meta returns the metadata for the block Meta() Metadata }
StepIter iterates through a block vertically