Documentation ¶
Index ¶
- Variables
- func LongFrameVersions() []data.FrameTypeVersion
- func MultiFrameVersions() []data.FrameTypeVersion
- func WideFrameVersions() []data.FrameTypeVersion
- type Collection
- type CollectionReader
- type LongFrame
- type MetricRef
- func (m MetricRef) GetLabels() data.Labels
- func (m MetricRef) GetMetricName() string
- func (m MetricRef) Len() (int, error)
- func (m MetricRef) NullableFloat64Point(pointIdx int) (time.Time, *float64, error)
- func (m MetricRef) NullableFloat64Value(pointIdx int) (*float64, error)
- func (m MetricRef) Time(pointIdx int) (time.Time, error)
- 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) GetCollection(validateData bool) (Collection, 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) GetCollection(validateData bool) (Collection, 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 ¶
var LongFrameVersionLatest = LongFrameVersions()[len(LongFrameVersions())-1]
var MultiFrameVersionLatest = MultiFrameVersions()[len(MultiFrameVersions())-1]
var WideFrameVersionLatest = WideFrameVersions()[len(WideFrameVersions())-1]
Functions ¶
func LongFrameVersions ¶ added in v0.148.0
func LongFrameVersions() []data.FrameTypeVersion
func MultiFrameVersions ¶ added in v0.148.0
func MultiFrameVersions() []data.FrameTypeVersion
func WideFrameVersions ¶ added in v0.148.0
func WideFrameVersions() []data.FrameTypeVersion
Types ¶
type Collection ¶ added in v0.148.0
type Collection struct { Refs []MetricRef RemainderIndices []sdata.FrameFieldIndex Warning error }
type CollectionReader ¶
type CollectionReader interface { // GetCollection 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. GetCollection(validateData bool) (Collection, 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(v data.FrameTypeVersion) (*LongFrame, error)
func (*LongFrame) GetCollection ¶ added in v0.148.0
func (ls *LongFrame) GetCollection(validateData bool) (Collection, error)
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 ¶
func (MetricRef) NullableFloat64Point ¶ added in v0.148.0
NullableFloat64Point returns the time and *float64 value at the specified index. It will error if the index is out of bounds, or if the value can not be converted to a *float64.
func (MetricRef) NullableFloat64Value ¶ added in v0.148.0
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(v data.FrameTypeVersion) (*MultiFrame, error)
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) GetCollection ¶ added in v0.148.0
func (mfs *MultiFrame) GetCollection(validateData bool) (Collection, 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(v data.FrameTypeVersion) (*WideFrame, error)
func (*WideFrame) GetCollection ¶ added in v0.148.0
func (wf *WideFrame) GetCollection(validateData bool) (Collection, error)