Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ptr ¶ added in v1.2.0
func Ptr[T any](v T) *T
Ptr is an helper function to return the pointer of any type
func RelativeIntervalToRange ¶
ToRange converts the relative interval to a prom.Range.
The origin is used to calculate the absolute timestamps in the samples.
func RelativeIntervalsToRangeVectors ¶
func RelativeIntervalsToRangeVectors( intervals []RelativeInterval, origin model.Time, step time.Duration) prom.RangeVector
RelativeIntervalsToRangeVectors converts a slice of relative intervals to a prom.RangeVector.
Types ¶
type RelativeInterval ¶
type RelativeInterval struct {
Labels model.LabelSet
Start int // relative start in minutes
End int // relative end in minutes
}
RelativeInterval represents a labeled interval with relative start and end times.
It can be used to generate various data structures for testing purposes, such as prom.Range or [processor.Interval].
Click to show internal directories.
Click to hide internal directories.