Documentation
¶
Index ¶
- type CollectionReader
- type LongFrame
- type MetricRef
- type MultiFrame
- func (mfs *MultiFrame) AddSeries(metricName string, l data.Labels, t []time.Time, values interface{}) error
- func (mfs *MultiFrame) Frames() []*data.Frame
- func (mfs *MultiFrame) GetMetricRefs(validateData bool) ([]MetricRef, []sdata.FrameFieldIndex, error)
- func (mfs *MultiFrame) SetMetricMD(metricName string, l data.Labels, fc data.FieldConfig)
- type WideFrame
- func (wf *WideFrame) AddSeries(metricName string, l data.Labels, values interface{}) error
- func (wf *WideFrame) Frames() []*data.Frame
- func (wf *WideFrame) GetMetricRefs(validateData bool) ([]MetricRef, []sdata.FrameFieldIndex, error)
- func (wf *WideFrame) SetMetricMD(metricName string, l data.Labels, fc data.FieldConfig)
- func (wf *WideFrame) SetTime(timeName string, t []time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionReader ¶
type CollectionReader interface { // GetMetricRefs runs validate without validateData. If the data is valid, then // []TimeSeriesMetricRef is returned from reading as well as any ignored data. If invalid, // then an error is returned, and no refs or ignoredFieldIndices are returned. GetMetricRefs(validateData bool) (refs []MetricRef, ignoredFieldIndices []sdata.FrameFieldIndex, err error) Frames() []*data.Frame // returns underlying frames }
func CollectionReaderFromFrames ¶
func CollectionReaderFromFrames(frames []*data.Frame) (CollectionReader, error)
type LongFrame ¶
LongFrame is a time series format where all series live in one frame. This time series format should be used with Table-like sources (e.g. SQL) that do not have a native concept of Labels.
func NewLongFrame ¶
func NewLongFrame() *LongFrame
func (*LongFrame) GetMetricRefs ¶
type MetricRef ¶
MetricRef is for reading and contains the data for an individual time series. In the cases of the Multi and Wide formats, the Fields are pointers to the data in the original frame. In the case of Long new fields are constructed.
func (MetricRef) GetMetricName ¶
type MultiFrame ¶
MultiFrame is a time series format where each series lives in its own single frame. This time series format should be use for data that natively uses Labels and when all of the series are not guaranteed to have identical time values.
func NewMultiFrame ¶
func NewMultiFrame() *MultiFrame
NewMultiFrame creates an empty MultiFrame formatted time series. This function must be called before the AddSeries Method. The returned MultiFrame is a valid typed data response that corresponds to "No Data".
func (*MultiFrame) AddSeries ¶
func (mfs *MultiFrame) AddSeries(metricName string, l data.Labels, t []time.Time, values interface{}) error
values must be a numeric slice such as []int64, []float64, []*float64, etc or []bool / []*bool.
func (*MultiFrame) Frames ¶
func (mfs *MultiFrame) Frames() []*data.Frame
func (*MultiFrame) GetMetricRefs ¶
func (mfs *MultiFrame) GetMetricRefs(validateData bool) ([]MetricRef, []sdata.FrameFieldIndex, error)
func (*MultiFrame) SetMetricMD ¶
func (mfs *MultiFrame) SetMetricMD(metricName string, l data.Labels, fc data.FieldConfig)
type WideFrame ¶
WideFrame is a time series format where all the series live in one frame. This time series format should be use for data that natively uses Labels and when all of the series are guaranteed to have identical time values.
func NewWideFrame ¶
func NewWideFrame() *WideFrame