Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 map[string]string
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.