Documentation ¶
Overview ¶
Package block is a generated GoMock package.
Index ¶
- type Block
- type Builder
- type ColStep
- type ColumnBlockBuilder
- type Iterator
- type Metadata
- type MockBlock
- type MockBlockMockRecorder
- type MockBuilder
- type MockBuilderMockRecorder
- type MockSeriesIter
- func (m *MockSeriesIter) Close()
- func (m *MockSeriesIter) Current() (Series, error)
- func (m *MockSeriesIter) EXPECT() *MockSeriesIterMockRecorder
- func (m *MockSeriesIter) Meta() Metadata
- 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) Meta() *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) Meta() *gomock.Call
- func (mr *MockStepIterMockRecorder) Next() *gomock.Call
- func (mr *MockStepIterMockRecorder) SeriesMeta() *gomock.Call
- func (mr *MockStepIterMockRecorder) StepCount() *gomock.Call
- type MockStepMockRecorder
- type Result
- type Scalar
- type Series
- type SeriesIter
- type SeriesMeta
- type Step
- type StepIter
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 Builder ¶
type Builder interface { AppendValue(idx int, value float64) error AppendValues(idx int, values []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) 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
Build extracts the block TODO: Return an immutable copy
type Metadata ¶
type Metadata struct { Bounds models.Bounds Tags models.Tags // Common tags across different series }
Metadata is metadata for a block
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
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) 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
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) 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
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, error)
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) Meta ¶ added in v0.4.1
func (m *MockSeriesIter) Meta() Metadata
Meta 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) Meta ¶ added in v0.4.1
func (mr *MockSeriesIterMockRecorder) Meta() *gomock.Call
Meta indicates an expected call of Meta
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, error)
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) Meta ¶ added in v0.4.1
func (m *MockStepIter) Meta() Metadata
Meta mocks base method
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) Meta ¶ added in v0.4.1
func (mr *MockStepIterMockRecorder) Meta() *gomock.Call
Meta indicates an expected call of Meta
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 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)
SeriesIter returns a SeriesIterator
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