Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Truncate time.Duration
Functions ¶
func SetTruncateValue ¶
Types ¶
type DataPoint ¶
type DataPoint struct {
// contains filtered or unexported fields
}
Data is an array of timestamps and values representing the same source of data over a period of time
func (DataPoint) Float ¶
Return the float64 representation of the data. If the data is not represented by a float64 value a panic will follow
type Timeseries ¶
Timeseries represents a single source of data over a time period
func NewTimeseries ¶
func NewTimeseries(ID string) *Timeseries
NewTimeseries will start a new data timeseries with the given label
func (*Timeseries) Add ¶
func (ts *Timeseries) Add(d any) Data
Add a new Data point to the given Timeseries
func (*Timeseries) AddTimestamp ¶
func (ts *Timeseries) AddTimestamp(d any, t time.Time) Data
Add a new Data point to the given Timeseries
func (*Timeseries) GetReadingsInRange ¶
func (*Timeseries) Len ¶
func (ts *Timeseries) Len() int
Len returns the number of data points contained in this timeseries
func (*Timeseries) String ¶
func (ts *Timeseries) String() string
String returns a human readable string describing the data contained therein.
Click to show internal directories.
Click to hide internal directories.