Documentation ¶
Overview ¶
Package block is a generated GoMock package.
Index ¶
- func TakeLast(values ts.Datapoints) float64
- type AccountedBlock
- type AccumulatorBlock
- type Block
- type BlockInfo
- type BlockType
- type Builder
- type ColStep
- type ColumnBlockBuilder
- func (cb ColumnBlockBuilder) AddCols(num int) error
- func (cb ColumnBlockBuilder) AppendValue(idx int, value float64) error
- func (cb ColumnBlockBuilder) AppendValues(idx int, values []float64) error
- func (cb ColumnBlockBuilder) Build() Block
- func (cb ColumnBlockBuilder) BuildAsType(blockType BlockType) Block
- type ConsolidationFunc
- type Iterator
- type LazyOptions
- type MetaTransform
- type Metadata
- type MockBlock
- func (m *MockBlock) Close() error
- func (m *MockBlock) EXPECT() *MockBlockMockRecorder
- func (m *MockBlock) Info() BlockInfo
- func (m *MockBlock) Meta() Metadata
- func (m *MockBlock) SeriesIter() (SeriesIter, error)
- func (m *MockBlock) StepIter() (StepIter, error)
- func (m *MockBlock) Unconsolidated() (UnconsolidatedBlock, error)
- func (m *MockBlock) WithMetadata(arg0 Metadata, arg1 []SeriesMeta) (Block, error)
- type MockBlockMockRecorder
- func (mr *MockBlockMockRecorder) Close() *gomock.Call
- func (mr *MockBlockMockRecorder) Info() *gomock.Call
- func (mr *MockBlockMockRecorder) Meta() *gomock.Call
- func (mr *MockBlockMockRecorder) SeriesIter() *gomock.Call
- func (mr *MockBlockMockRecorder) StepIter() *gomock.Call
- func (mr *MockBlockMockRecorder) Unconsolidated() *gomock.Call
- func (mr *MockBlockMockRecorder) WithMetadata(arg0, arg1 interface{}) *gomock.Call
- type MockBuilder
- func (m *MockBuilder) AddCols(arg0 int) error
- func (m *MockBuilder) AppendValue(arg0 int, arg1 float64) error
- func (m *MockBuilder) AppendValues(arg0 int, arg1 []float64) error
- func (m *MockBuilder) Build() Block
- func (m *MockBuilder) BuildAsType(arg0 BlockType) Block
- func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder
- type MockBuilderMockRecorder
- func (mr *MockBuilderMockRecorder) AddCols(arg0 interface{}) *gomock.Call
- func (mr *MockBuilderMockRecorder) AppendValue(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockBuilderMockRecorder) AppendValues(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockBuilderMockRecorder) Build() *gomock.Call
- func (mr *MockBuilderMockRecorder) BuildAsType(arg0 interface{}) *gomock.Call
- type MockSeriesIter
- func (m *MockSeriesIter) Close()
- func (m *MockSeriesIter) Current() Series
- func (m *MockSeriesIter) EXPECT() *MockSeriesIterMockRecorder
- func (m *MockSeriesIter) Err() error
- func (m *MockSeriesIter) Next() bool
- func (m *MockSeriesIter) SeriesCount() int
- func (m *MockSeriesIter) SeriesMeta() []SeriesMeta
- type MockSeriesIterMockRecorder
- func (mr *MockSeriesIterMockRecorder) Close() *gomock.Call
- func (mr *MockSeriesIterMockRecorder) Current() *gomock.Call
- func (mr *MockSeriesIterMockRecorder) Err() *gomock.Call
- func (mr *MockSeriesIterMockRecorder) Next() *gomock.Call
- func (mr *MockSeriesIterMockRecorder) SeriesCount() *gomock.Call
- func (mr *MockSeriesIterMockRecorder) SeriesMeta() *gomock.Call
- type MockStep
- type MockStepIter
- type MockStepIterMockRecorder
- func (mr *MockStepIterMockRecorder) Close() *gomock.Call
- func (mr *MockStepIterMockRecorder) Current() *gomock.Call
- func (mr *MockStepIterMockRecorder) Err() *gomock.Call
- func (mr *MockStepIterMockRecorder) Next() *gomock.Call
- func (mr *MockStepIterMockRecorder) SeriesMeta() *gomock.Call
- func (mr *MockStepIterMockRecorder) StepCount() *gomock.Call
- type MockStepMockRecorder
- type MockUnconsolidatedBlock
- func (m *MockUnconsolidatedBlock) Close() error
- func (m *MockUnconsolidatedBlock) Consolidate() (Block, error)
- func (m *MockUnconsolidatedBlock) EXPECT() *MockUnconsolidatedBlockMockRecorder
- func (m *MockUnconsolidatedBlock) Meta() Metadata
- func (m *MockUnconsolidatedBlock) SeriesIter() (UnconsolidatedSeriesIter, error)
- func (m *MockUnconsolidatedBlock) StepIter() (UnconsolidatedStepIter, error)
- func (m *MockUnconsolidatedBlock) WithMetadata(arg0 Metadata, arg1 []SeriesMeta) (UnconsolidatedBlock, error)
- type MockUnconsolidatedBlockMockRecorder
- func (mr *MockUnconsolidatedBlockMockRecorder) Close() *gomock.Call
- func (mr *MockUnconsolidatedBlockMockRecorder) Consolidate() *gomock.Call
- func (mr *MockUnconsolidatedBlockMockRecorder) Meta() *gomock.Call
- func (mr *MockUnconsolidatedBlockMockRecorder) SeriesIter() *gomock.Call
- func (mr *MockUnconsolidatedBlockMockRecorder) StepIter() *gomock.Call
- func (mr *MockUnconsolidatedBlockMockRecorder) WithMetadata(arg0, arg1 interface{}) *gomock.Call
- type MockUnconsolidatedSeriesIter
- func (m *MockUnconsolidatedSeriesIter) Close()
- func (m *MockUnconsolidatedSeriesIter) Current() UnconsolidatedSeries
- func (m *MockUnconsolidatedSeriesIter) EXPECT() *MockUnconsolidatedSeriesIterMockRecorder
- func (m *MockUnconsolidatedSeriesIter) Err() error
- func (m *MockUnconsolidatedSeriesIter) Next() bool
- func (m *MockUnconsolidatedSeriesIter) SeriesCount() int
- func (m *MockUnconsolidatedSeriesIter) SeriesMeta() []SeriesMeta
- type MockUnconsolidatedSeriesIterMockRecorder
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) Close() *gomock.Call
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) Current() *gomock.Call
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) Err() *gomock.Call
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) Next() *gomock.Call
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) SeriesCount() *gomock.Call
- func (mr *MockUnconsolidatedSeriesIterMockRecorder) SeriesMeta() *gomock.Call
- type MockUnconsolidatedStep
- type MockUnconsolidatedStepIter
- func (m *MockUnconsolidatedStepIter) Close()
- func (m *MockUnconsolidatedStepIter) Current() UnconsolidatedStep
- func (m *MockUnconsolidatedStepIter) EXPECT() *MockUnconsolidatedStepIterMockRecorder
- func (m *MockUnconsolidatedStepIter) Err() error
- func (m *MockUnconsolidatedStepIter) Next() bool
- func (m *MockUnconsolidatedStepIter) SeriesMeta() []SeriesMeta
- func (m *MockUnconsolidatedStepIter) StepCount() int
- type MockUnconsolidatedStepIterMockRecorder
- func (mr *MockUnconsolidatedStepIterMockRecorder) Close() *gomock.Call
- func (mr *MockUnconsolidatedStepIterMockRecorder) Current() *gomock.Call
- func (mr *MockUnconsolidatedStepIterMockRecorder) Err() *gomock.Call
- func (mr *MockUnconsolidatedStepIterMockRecorder) Next() *gomock.Call
- func (mr *MockUnconsolidatedStepIterMockRecorder) SeriesMeta() *gomock.Call
- func (mr *MockUnconsolidatedStepIterMockRecorder) StepCount() *gomock.Call
- type MockUnconsolidatedStepMockRecorder
- type Result
- type Scalar
- func (b *Scalar) Close() error
- func (c *Scalar) Info() BlockInfo
- func (b *Scalar) Meta() Metadata
- func (b *Scalar) SeriesIter() (SeriesIter, error)
- func (b *Scalar) StepIter() (StepIter, error)
- func (b *Scalar) Unconsolidated() (UnconsolidatedBlock, error)
- func (b *Scalar) Value() float64
- func (b *Scalar) WithMetadata(meta Metadata, _ []SeriesMeta) (Block, error)
- type Series
- type SeriesIter
- type SeriesMeta
- type SeriesMetaIter
- type Step
- type StepIter
- type StepMetaIter
- type TimeTransform
- type UnconsolidatedBlock
- type UnconsolidatedSeries
- type UnconsolidatedSeriesIter
- type UnconsolidatedStep
- type UnconsolidatedStepIter
- type ValueTransform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TakeLast ¶ added in v0.4.6
func TakeLast(values ts.Datapoints) float64
TakeLast is a consolidation function which takes the last datapoint which has non nan value.
Types ¶
type AccountedBlock ¶ added in v0.7.1
type AccountedBlock struct { Block // contains filtered or unexported fields }
AccountedBlock is a wrapper for a block which enforces limits on the number of datapoints used by the block.
func NewAccountedBlock ¶ added in v0.7.1
func NewAccountedBlock( wrapped Block, enforcer cost.ChainedEnforcer, ) *AccountedBlock
NewAccountedBlock wraps the given block and enforces datapoint limits.
func (*AccountedBlock) Close ¶ added in v0.7.1
func (ab *AccountedBlock) Close() error
Close closes the block, and marks the number of datapoints used by this block as finished.
type AccumulatorBlock ¶ added in v0.9.3
type AccumulatorBlock interface { Block // AddBlock adds a block to this accumulator. AddBlock(bl Block) error }
func NewContainerBlock ¶ added in v0.9.3
func NewContainerBlock(blocks ...Block) (AccumulatorBlock, error)
NewContainerBlock creates a container block, which allows iterating across blocks incoming from multiple data sources, provided they have the same bounds.
type Block ¶
type Block interface { io.Closer // Unconsolidated returns the unconsolidated version of the block. Unconsolidated() (UnconsolidatedBlock, error) // StepIter returns a step-wise block iterator, giving consolidated values // across all series comprising the box at a single time step. StepIter() (StepIter, error) // SeriesIter returns a series-wise block iterator, giving consolidated values // by series. SeriesIter() (SeriesIter, error) // WithMetadata returns a block with updated meta and series metadata. WithMetadata(Metadata, []SeriesMeta) (Block, error) // Meta returns the metadata for the block. Meta() Metadata // Info returns information about the block. Info() BlockInfo }
Block represents a group of series across a time bound.
func NewEmptyBlock ¶ added in v0.11.0
NewEmptyBlock creates an empty block with the given metadata.
func NewLazyBlock ¶ added in v0.9.2
func NewLazyBlock(block Block, opts LazyOptions) Block
NewLazyBlock creates a lazy block wrapping another block with lazy options.
type BlockInfo ¶ added in v0.11.0
type BlockInfo struct {
// contains filtered or unexported fields
}
func NewBlockInfo ¶ added in v0.11.0
func NewWrappedBlockInfo ¶ added in v0.11.0
type BlockType ¶ added in v0.11.0
type BlockType uint8
BlockType describes a block type.
const ( // BlockM3TSZCompressed is an M3TSZ compressed block. BlockM3TSZCompressed BlockType = iota // BlockDecompressed is a decompressed raw data block. BlockDecompressed // BlockScalar is a scalar block with a single value throughout its range. BlockScalar // BlockTime is a block with datapoint values given by a function of their // timestamps. BlockTime // BlockLazy is a wrapper for an inner block that lazily applies transforms. BlockLazy // BlockContainer is a block that contains multiple inner blocks that share // common metadata. BlockContainer // BlockEmpty is a block with metadata but no series or values. BlockEmpty // // TODO: (arnikola) do some refactoring to remove the blocks and types below, // as they can be better handled by the above block types. // // BlockMultiSeries is a block containing series with common metadata. BlockMultiSeries // BlockConsolidated is a consolidated block. BlockConsolidated )
type Builder ¶
type Builder interface { // AddCols adds the given number of columns to the block. AddCols(num int) error // AppendValue adds a single value to the column at the given index. AppendValue(idx int, value float64) error // AppendValues adds a slice of values to the column at the given index. AppendValues(idx int, values []float64) error // Build builds the block. Build() Block // BuildAsType builds the block, forcing it to the given BlockType. BuildAsType(blockType BlockType) Block }
Builder builds a new block.
func NewColumnBlockBuilder ¶
func NewColumnBlockBuilder( queryCtx *models.QueryContext, 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
func (ColumnBlockBuilder) AppendValue ¶
func (cb ColumnBlockBuilder) AppendValue(idx int, value float64) error
AppendValue adds a value to a column at index
func (ColumnBlockBuilder) AppendValues ¶ added in v0.4.1
func (cb ColumnBlockBuilder) AppendValues(idx int, values []float64) error
AppendValues adds a slice of values to a column at index
func (ColumnBlockBuilder) Build ¶
func (cb ColumnBlockBuilder) Build() Block
func (ColumnBlockBuilder) BuildAsType ¶ added in v0.11.0
func (cb ColumnBlockBuilder) BuildAsType(blockType BlockType) Block
type ConsolidationFunc ¶ added in v0.4.6
type ConsolidationFunc func(datapoints ts.Datapoints) float64
ConsolidationFunc consolidates a bunch of datapoints into a single float value.
type Iterator ¶
type Iterator interface { // Next moves to the next item in the iterator. It will return false if there // are no more items, or if encountering an error. // // NB: it is important to check that Err() is nil after Next returns false, to // ensure that any errors during iteration are detected and accounted for. Next() bool // Err returns any error encountered during iteration. Err() error // Close frees up resources held by the iterator. Close() }
Iterator is the base iterator.
type LazyOptions ¶ added in v0.9.2
type LazyOptions interface { // SetTimeTransform sets the time transform function. SetTimeTransform(TimeTransform) LazyOptions // TimeTransform returns the time transform function. TimeTransform() TimeTransform // SetMetaTransform sets the meta transform function. SetMetaTransform(MetaTransform) LazyOptions // MetaTransform returns the meta transform function. MetaTransform() MetaTransform // SetValueTransform sets the value transform function. SetValueTransform(ValueTransform) LazyOptions // ValueTransform returns the value transform function. ValueTransform() ValueTransform }
LazyOptions describes options for lazy blocks.
func NewLazyOptions ¶ added in v0.11.0
func NewLazyOptions() LazyOptions
NewLazyOptions creates LazyOpts with default values.
type MetaTransform ¶ added in v0.9.2
MetaTransform transforms meta data.
type Metadata ¶
type Metadata struct { Bounds models.Bounds Tags models.Tags // Common tags across different series }
Metadata is metadata for a block, describing size and common tags accross constituent series.
func MustMakeMeta ¶ added in v0.11.0
MustMakeMeta returns block metadata or panics (unsafe for use).
type MockBlock ¶ added in v0.4.1
type MockBlock struct {
// contains filtered or unexported fields
}
MockBlock is a mock of Block interface
func NewMockBlock ¶ added in v0.4.1
func NewMockBlock(ctrl *gomock.Controller) *MockBlock
NewMockBlock creates a new mock instance
func (*MockBlock) EXPECT ¶ added in v0.4.1
func (m *MockBlock) EXPECT() *MockBlockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBlock) SeriesIter ¶ added in v0.4.1
func (m *MockBlock) SeriesIter() (SeriesIter, error)
SeriesIter mocks base method
func (*MockBlock) Unconsolidated ¶ added in v0.4.6
func (m *MockBlock) Unconsolidated() (UnconsolidatedBlock, error)
Unconsolidated mocks base method
func (*MockBlock) WithMetadata ¶ added in v0.4.8
func (m *MockBlock) WithMetadata(arg0 Metadata, arg1 []SeriesMeta) (Block, error)
WithMetadata mocks base method
type MockBlockMockRecorder ¶ added in v0.4.1
type MockBlockMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockMockRecorder is the mock recorder for MockBlock
func (*MockBlockMockRecorder) Close ¶ added in v0.4.1
func (mr *MockBlockMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockBlockMockRecorder) Info ¶ added in v0.11.0
func (mr *MockBlockMockRecorder) Info() *gomock.Call
Info indicates an expected call of Info
func (*MockBlockMockRecorder) Meta ¶ added in v0.11.0
func (mr *MockBlockMockRecorder) Meta() *gomock.Call
Meta indicates an expected call of Meta
func (*MockBlockMockRecorder) SeriesIter ¶ added in v0.4.1
func (mr *MockBlockMockRecorder) SeriesIter() *gomock.Call
SeriesIter indicates an expected call of SeriesIter
func (*MockBlockMockRecorder) StepIter ¶ added in v0.4.1
func (mr *MockBlockMockRecorder) StepIter() *gomock.Call
StepIter indicates an expected call of StepIter
func (*MockBlockMockRecorder) Unconsolidated ¶ added in v0.4.6
func (mr *MockBlockMockRecorder) Unconsolidated() *gomock.Call
Unconsolidated indicates an expected call of Unconsolidated
func (*MockBlockMockRecorder) WithMetadata ¶ added in v0.4.8
func (mr *MockBlockMockRecorder) WithMetadata(arg0, arg1 interface{}) *gomock.Call
WithMetadata indicates an expected call of WithMetadata
type MockBuilder ¶ added in v0.4.1
type MockBuilder struct {
// contains filtered or unexported fields
}
MockBuilder is a mock of Builder interface
func NewMockBuilder ¶ added in v0.4.1
func NewMockBuilder(ctrl *gomock.Controller) *MockBuilder
NewMockBuilder creates a new mock instance
func (*MockBuilder) AddCols ¶ added in v0.4.1
func (m *MockBuilder) AddCols(arg0 int) error
AddCols mocks base method
func (*MockBuilder) AppendValue ¶ added in v0.4.1
func (m *MockBuilder) AppendValue(arg0 int, arg1 float64) error
AppendValue mocks base method
func (*MockBuilder) AppendValues ¶ added in v0.4.1
func (m *MockBuilder) AppendValues(arg0 int, arg1 []float64) error
AppendValues mocks base method
func (*MockBuilder) Build ¶ added in v0.4.1
func (m *MockBuilder) Build() Block
Build mocks base method
func (*MockBuilder) BuildAsType ¶ added in v0.11.0
func (m *MockBuilder) BuildAsType(arg0 BlockType) Block
BuildAsType mocks base method
func (*MockBuilder) EXPECT ¶ added in v0.4.1
func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockBuilderMockRecorder ¶ added in v0.4.1
type MockBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockBuilderMockRecorder is the mock recorder for MockBuilder
func (*MockBuilderMockRecorder) AddCols ¶ added in v0.4.1
func (mr *MockBuilderMockRecorder) AddCols(arg0 interface{}) *gomock.Call
AddCols indicates an expected call of AddCols
func (*MockBuilderMockRecorder) AppendValue ¶ added in v0.4.1
func (mr *MockBuilderMockRecorder) AppendValue(arg0, arg1 interface{}) *gomock.Call
AppendValue indicates an expected call of AppendValue
func (*MockBuilderMockRecorder) AppendValues ¶ added in v0.4.1
func (mr *MockBuilderMockRecorder) AppendValues(arg0, arg1 interface{}) *gomock.Call
AppendValues indicates an expected call of AppendValues
func (*MockBuilderMockRecorder) Build ¶ added in v0.4.1
func (mr *MockBuilderMockRecorder) Build() *gomock.Call
Build indicates an expected call of Build
func (*MockBuilderMockRecorder) BuildAsType ¶ added in v0.11.0
func (mr *MockBuilderMockRecorder) BuildAsType(arg0 interface{}) *gomock.Call
BuildAsType indicates an expected call of BuildAsType
type MockSeriesIter ¶ added in v0.4.1
type MockSeriesIter struct {
// contains filtered or unexported fields
}
MockSeriesIter is a mock of SeriesIter interface
func NewMockSeriesIter ¶ added in v0.4.1
func NewMockSeriesIter(ctrl *gomock.Controller) *MockSeriesIter
NewMockSeriesIter creates a new mock instance
func (*MockSeriesIter) Close ¶ added in v0.4.1
func (m *MockSeriesIter) Close()
Close mocks base method
func (*MockSeriesIter) Current ¶ added in v0.4.1
func (m *MockSeriesIter) Current() Series
Current mocks base method
func (*MockSeriesIter) EXPECT ¶ added in v0.4.1
func (m *MockSeriesIter) EXPECT() *MockSeriesIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSeriesIter) Err ¶ added in v0.6.0
func (m *MockSeriesIter) Err() error
Err mocks base method
func (*MockSeriesIter) Next ¶ added in v0.4.1
func (m *MockSeriesIter) Next() bool
Next mocks base method
func (*MockSeriesIter) SeriesCount ¶ added in v0.4.1
func (m *MockSeriesIter) SeriesCount() int
SeriesCount mocks base method
func (*MockSeriesIter) SeriesMeta ¶ added in v0.4.1
func (m *MockSeriesIter) SeriesMeta() []SeriesMeta
SeriesMeta mocks base method
type MockSeriesIterMockRecorder ¶ added in v0.4.1
type MockSeriesIterMockRecorder struct {
// contains filtered or unexported fields
}
MockSeriesIterMockRecorder is the mock recorder for MockSeriesIter
func (*MockSeriesIterMockRecorder) Close ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockSeriesIterMockRecorder) Current ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockSeriesIterMockRecorder) Err ¶ added in v0.6.0
func (mr *MockSeriesIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockSeriesIterMockRecorder) Next ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockSeriesIterMockRecorder) SeriesCount ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) SeriesCount() *gomock.Call
SeriesCount indicates an expected call of SeriesCount
func (*MockSeriesIterMockRecorder) SeriesMeta ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) SeriesMeta() *gomock.Call
SeriesMeta indicates an expected call of SeriesMeta
type MockStep ¶ added in v0.4.1
type MockStep struct {
// contains filtered or unexported fields
}
MockStep is a mock of Step interface
func NewMockStep ¶ added in v0.4.1
func NewMockStep(ctrl *gomock.Controller) *MockStep
NewMockStep creates a new mock instance
func (*MockStep) EXPECT ¶ added in v0.4.1
func (m *MockStep) EXPECT() *MockStepMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockStepIter ¶ added in v0.4.1
type MockStepIter struct {
// contains filtered or unexported fields
}
MockStepIter is a mock of StepIter interface
func NewMockStepIter ¶ added in v0.4.1
func NewMockStepIter(ctrl *gomock.Controller) *MockStepIter
NewMockStepIter creates a new mock instance
func (*MockStepIter) Current ¶ added in v0.4.1
func (m *MockStepIter) Current() Step
Current mocks base method
func (*MockStepIter) EXPECT ¶ added in v0.4.1
func (m *MockStepIter) EXPECT() *MockStepIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStepIter) Next ¶ added in v0.4.1
func (m *MockStepIter) Next() bool
Next mocks base method
func (*MockStepIter) SeriesMeta ¶ added in v0.4.1
func (m *MockStepIter) SeriesMeta() []SeriesMeta
SeriesMeta mocks base method
func (*MockStepIter) StepCount ¶ added in v0.4.1
func (m *MockStepIter) StepCount() int
StepCount mocks base method
type MockStepIterMockRecorder ¶ added in v0.4.1
type MockStepIterMockRecorder struct {
// contains filtered or unexported fields
}
MockStepIterMockRecorder is the mock recorder for MockStepIter
func (*MockStepIterMockRecorder) Close ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockStepIterMockRecorder) Current ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockStepIterMockRecorder) Err ¶ added in v0.6.0
func (mr *MockStepIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockStepIterMockRecorder) Next ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockStepIterMockRecorder) SeriesMeta ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) SeriesMeta() *gomock.Call
SeriesMeta indicates an expected call of SeriesMeta
func (*MockStepIterMockRecorder) StepCount ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) StepCount() *gomock.Call
StepCount indicates an expected call of StepCount
type MockStepMockRecorder ¶ added in v0.4.1
type MockStepMockRecorder struct {
// contains filtered or unexported fields
}
MockStepMockRecorder is the mock recorder for MockStep
func (*MockStepMockRecorder) Time ¶ added in v0.4.1
func (mr *MockStepMockRecorder) Time() *gomock.Call
Time indicates an expected call of Time
func (*MockStepMockRecorder) Values ¶ added in v0.4.1
func (mr *MockStepMockRecorder) Values() *gomock.Call
Values indicates an expected call of Values
type MockUnconsolidatedBlock ¶ added in v0.8.4
type MockUnconsolidatedBlock struct {
// contains filtered or unexported fields
}
MockUnconsolidatedBlock is a mock of UnconsolidatedBlock interface
func NewMockUnconsolidatedBlock ¶ added in v0.8.4
func NewMockUnconsolidatedBlock(ctrl *gomock.Controller) *MockUnconsolidatedBlock
NewMockUnconsolidatedBlock creates a new mock instance
func (*MockUnconsolidatedBlock) Close ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) Close() error
Close mocks base method
func (*MockUnconsolidatedBlock) Consolidate ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) Consolidate() (Block, error)
Consolidate mocks base method
func (*MockUnconsolidatedBlock) EXPECT ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) EXPECT() *MockUnconsolidatedBlockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnconsolidatedBlock) Meta ¶ added in v0.11.0
func (m *MockUnconsolidatedBlock) Meta() Metadata
Meta mocks base method
func (*MockUnconsolidatedBlock) SeriesIter ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) SeriesIter() (UnconsolidatedSeriesIter, error)
SeriesIter mocks base method
func (*MockUnconsolidatedBlock) StepIter ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) StepIter() (UnconsolidatedStepIter, error)
StepIter mocks base method
func (*MockUnconsolidatedBlock) WithMetadata ¶ added in v0.8.4
func (m *MockUnconsolidatedBlock) WithMetadata(arg0 Metadata, arg1 []SeriesMeta) (UnconsolidatedBlock, error)
WithMetadata mocks base method
type MockUnconsolidatedBlockMockRecorder ¶ added in v0.8.4
type MockUnconsolidatedBlockMockRecorder struct {
// contains filtered or unexported fields
}
MockUnconsolidatedBlockMockRecorder is the mock recorder for MockUnconsolidatedBlock
func (*MockUnconsolidatedBlockMockRecorder) Close ¶ added in v0.8.4
func (mr *MockUnconsolidatedBlockMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockUnconsolidatedBlockMockRecorder) Consolidate ¶ added in v0.8.4
func (mr *MockUnconsolidatedBlockMockRecorder) Consolidate() *gomock.Call
Consolidate indicates an expected call of Consolidate
func (*MockUnconsolidatedBlockMockRecorder) Meta ¶ added in v0.11.0
func (mr *MockUnconsolidatedBlockMockRecorder) Meta() *gomock.Call
Meta indicates an expected call of Meta
func (*MockUnconsolidatedBlockMockRecorder) SeriesIter ¶ added in v0.8.4
func (mr *MockUnconsolidatedBlockMockRecorder) SeriesIter() *gomock.Call
SeriesIter indicates an expected call of SeriesIter
func (*MockUnconsolidatedBlockMockRecorder) StepIter ¶ added in v0.8.4
func (mr *MockUnconsolidatedBlockMockRecorder) StepIter() *gomock.Call
StepIter indicates an expected call of StepIter
func (*MockUnconsolidatedBlockMockRecorder) WithMetadata ¶ added in v0.8.4
func (mr *MockUnconsolidatedBlockMockRecorder) WithMetadata(arg0, arg1 interface{}) *gomock.Call
WithMetadata indicates an expected call of WithMetadata
type MockUnconsolidatedSeriesIter ¶ added in v0.8.4
type MockUnconsolidatedSeriesIter struct {
// contains filtered or unexported fields
}
MockUnconsolidatedSeriesIter is a mock of UnconsolidatedSeriesIter interface
func NewMockUnconsolidatedSeriesIter ¶ added in v0.8.4
func NewMockUnconsolidatedSeriesIter(ctrl *gomock.Controller) *MockUnconsolidatedSeriesIter
NewMockUnconsolidatedSeriesIter creates a new mock instance
func (*MockUnconsolidatedSeriesIter) Close ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) Close()
Close mocks base method
func (*MockUnconsolidatedSeriesIter) Current ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) Current() UnconsolidatedSeries
Current mocks base method
func (*MockUnconsolidatedSeriesIter) EXPECT ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) EXPECT() *MockUnconsolidatedSeriesIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnconsolidatedSeriesIter) Err ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) Err() error
Err mocks base method
func (*MockUnconsolidatedSeriesIter) Next ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) Next() bool
Next mocks base method
func (*MockUnconsolidatedSeriesIter) SeriesCount ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) SeriesCount() int
SeriesCount mocks base method
func (*MockUnconsolidatedSeriesIter) SeriesMeta ¶ added in v0.8.4
func (m *MockUnconsolidatedSeriesIter) SeriesMeta() []SeriesMeta
SeriesMeta mocks base method
type MockUnconsolidatedSeriesIterMockRecorder ¶ added in v0.8.4
type MockUnconsolidatedSeriesIterMockRecorder struct {
// contains filtered or unexported fields
}
MockUnconsolidatedSeriesIterMockRecorder is the mock recorder for MockUnconsolidatedSeriesIter
func (*MockUnconsolidatedSeriesIterMockRecorder) Close ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockUnconsolidatedSeriesIterMockRecorder) Current ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockUnconsolidatedSeriesIterMockRecorder) Err ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockUnconsolidatedSeriesIterMockRecorder) Next ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockUnconsolidatedSeriesIterMockRecorder) SeriesCount ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) SeriesCount() *gomock.Call
SeriesCount indicates an expected call of SeriesCount
func (*MockUnconsolidatedSeriesIterMockRecorder) SeriesMeta ¶ added in v0.8.4
func (mr *MockUnconsolidatedSeriesIterMockRecorder) SeriesMeta() *gomock.Call
SeriesMeta indicates an expected call of SeriesMeta
type MockUnconsolidatedStep ¶ added in v0.8.4
type MockUnconsolidatedStep struct {
// contains filtered or unexported fields
}
MockUnconsolidatedStep is a mock of UnconsolidatedStep interface
func NewMockUnconsolidatedStep ¶ added in v0.8.4
func NewMockUnconsolidatedStep(ctrl *gomock.Controller) *MockUnconsolidatedStep
NewMockUnconsolidatedStep creates a new mock instance
func (*MockUnconsolidatedStep) EXPECT ¶ added in v0.8.4
func (m *MockUnconsolidatedStep) EXPECT() *MockUnconsolidatedStepMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnconsolidatedStep) Time ¶ added in v0.8.4
func (m *MockUnconsolidatedStep) Time() time.Time
Time mocks base method
func (*MockUnconsolidatedStep) Values ¶ added in v0.8.4
func (m *MockUnconsolidatedStep) Values() []ts.Datapoints
Values mocks base method
type MockUnconsolidatedStepIter ¶ added in v0.8.4
type MockUnconsolidatedStepIter struct {
// contains filtered or unexported fields
}
MockUnconsolidatedStepIter is a mock of UnconsolidatedStepIter interface
func NewMockUnconsolidatedStepIter ¶ added in v0.8.4
func NewMockUnconsolidatedStepIter(ctrl *gomock.Controller) *MockUnconsolidatedStepIter
NewMockUnconsolidatedStepIter creates a new mock instance
func (*MockUnconsolidatedStepIter) Close ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) Close()
Close mocks base method
func (*MockUnconsolidatedStepIter) Current ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) Current() UnconsolidatedStep
Current mocks base method
func (*MockUnconsolidatedStepIter) EXPECT ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) EXPECT() *MockUnconsolidatedStepIterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnconsolidatedStepIter) Err ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) Err() error
Err mocks base method
func (*MockUnconsolidatedStepIter) Next ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) Next() bool
Next mocks base method
func (*MockUnconsolidatedStepIter) SeriesMeta ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) SeriesMeta() []SeriesMeta
SeriesMeta mocks base method
func (*MockUnconsolidatedStepIter) StepCount ¶ added in v0.8.4
func (m *MockUnconsolidatedStepIter) StepCount() int
StepCount mocks base method
type MockUnconsolidatedStepIterMockRecorder ¶ added in v0.8.4
type MockUnconsolidatedStepIterMockRecorder struct {
// contains filtered or unexported fields
}
MockUnconsolidatedStepIterMockRecorder is the mock recorder for MockUnconsolidatedStepIter
func (*MockUnconsolidatedStepIterMockRecorder) Close ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockUnconsolidatedStepIterMockRecorder) Current ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockUnconsolidatedStepIterMockRecorder) Err ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockUnconsolidatedStepIterMockRecorder) Next ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockUnconsolidatedStepIterMockRecorder) SeriesMeta ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) SeriesMeta() *gomock.Call
SeriesMeta indicates an expected call of SeriesMeta
func (*MockUnconsolidatedStepIterMockRecorder) StepCount ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepIterMockRecorder) StepCount() *gomock.Call
StepCount indicates an expected call of StepCount
type MockUnconsolidatedStepMockRecorder ¶ added in v0.8.4
type MockUnconsolidatedStepMockRecorder struct {
// contains filtered or unexported fields
}
MockUnconsolidatedStepMockRecorder is the mock recorder for MockUnconsolidatedStep
func (*MockUnconsolidatedStepMockRecorder) Time ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepMockRecorder) Time() *gomock.Call
Time indicates an expected call of Time
func (*MockUnconsolidatedStepMockRecorder) Values ¶ added in v0.8.4
func (mr *MockUnconsolidatedStepMockRecorder) Values() *gomock.Call
Values indicates an expected call of Values
type Scalar ¶ added in v0.4.1
type Scalar struct {
// contains filtered or unexported fields
}
Scalar is a block containing a single value over a certain bound This represents constant values; it greatly simplifies downstream operations by allowing them to treat this as a regular block, while at the same time having an option to optimize by accessing the scalar value directly instead.
func (*Scalar) SeriesIter ¶ added in v0.4.1
func (b *Scalar) SeriesIter() (SeriesIter, error)
func (*Scalar) Unconsolidated ¶ added in v0.4.6
func (b *Scalar) Unconsolidated() (UnconsolidatedBlock, error)
Unconsolidated returns the unconsolidated version for the block.
func (*Scalar) WithMetadata ¶ added in v0.4.8
func (b *Scalar) WithMetadata( meta Metadata, _ []SeriesMeta, ) (Block, error)
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 SeriesMetaIter // Current returns the current series for the block. Current() Series }
SeriesIter iterates through a block horizontally.
type SeriesMeta ¶
SeriesMeta is metadata data for the series.
func MustMakeSeriesMeta ¶ added in v0.11.0
func MustMakeSeriesMeta(tags ...string) SeriesMeta
MustMakeSeriesMeta returns series metadata or panics (unsafe for use).
type SeriesMetaIter ¶ added in v0.4.6
type SeriesMetaIter interface { // SeriesMeta returns the metadata for each series in the block. SeriesMeta() []SeriesMeta // SeriesCount returns the number of series. SeriesCount() int }
SeriesMetaIter is implemented by series iterators which provide meta information.
type StepIter ¶
type StepIter interface { Iterator StepMetaIter // Current returns the current step for the block. Current() Step }
StepIter iterates through a block vertically.
type StepMetaIter ¶ added in v0.4.6
type StepMetaIter interface { // SeriesMeta returns the metadata for each series in the block. SeriesMeta() []SeriesMeta // StepCount returns the number of steps. StepCount() int }
StepMetaIter is implemented by step iterators which provide meta information.
type TimeTransform ¶ added in v0.9.2
TimeTransform transforms a timestamp.
type UnconsolidatedBlock ¶ added in v0.4.6
type UnconsolidatedBlock interface { io.Closer // StepIter returns a step-wise block iterator, giving unconsolidated values // across all series comprising the box at a single time step. StepIter() (UnconsolidatedStepIter, error) // SeriesIter returns a series-wise block iterator, giving unconsolidated // by series. SeriesIter() (UnconsolidatedSeriesIter, error) // Consolidate attempts to consolidate the unconsolidated block. Consolidate() (Block, error) // WithMetadata returns a block with updated meta and series metadata. WithMetadata(Metadata, []SeriesMeta) (UnconsolidatedBlock, error) // Meta returns the metadata for the block. Meta() Metadata }
UnconsolidatedBlock represents a group of unconsolidated series across a time bound
type UnconsolidatedSeries ¶ added in v0.4.6
type UnconsolidatedSeries struct { Meta SeriesMeta // contains filtered or unexported fields }
UnconsolidatedSeries is the series with raw datapoints
func NewUnconsolidatedSeries ¶ added in v0.4.6
func NewUnconsolidatedSeries(datapoints []ts.Datapoints, meta SeriesMeta) UnconsolidatedSeries
NewUnconsolidatedSeries creates a new series with raw datapoints
func (UnconsolidatedSeries) Consolidated ¶ added in v0.4.6
func (s UnconsolidatedSeries) Consolidated(consolidationFunc ConsolidationFunc) Series
Consolidated consolidates the series
func (UnconsolidatedSeries) Datapoints ¶ added in v0.4.6
func (s UnconsolidatedSeries) Datapoints() []ts.Datapoints
Datapoints returns the internal datapoints slice
func (UnconsolidatedSeries) DatapointsAtStep ¶ added in v0.4.6
func (s UnconsolidatedSeries) DatapointsAtStep(idx int) ts.Datapoints
DatapointsAtStep returns the raw datapoints at a step index
func (UnconsolidatedSeries) Len ¶ added in v0.4.6
func (s UnconsolidatedSeries) Len() int
Len returns the number of datapoints slices in the series
type UnconsolidatedSeriesIter ¶ added in v0.4.6
type UnconsolidatedSeriesIter interface { Iterator SeriesMetaIter // Current returns the current series for the block. Current() UnconsolidatedSeries }
UnconsolidatedSeriesIter iterates through a block horizontally.
type UnconsolidatedStep ¶ added in v0.4.6
type UnconsolidatedStep interface { Time() time.Time Values() []ts.Datapoints }
UnconsolidatedStep is a single unconsolidated time step within a block.
type UnconsolidatedStepIter ¶ added in v0.4.6
type UnconsolidatedStepIter interface { Iterator StepMetaIter // Current returns the current step for the block. Current() UnconsolidatedStep }
UnconsolidatedStepIter iterates through a block vertically.
type ValueTransform ¶ added in v0.9.2
ValueTransform transform a float64.