time

package
v0.0.0-cloud Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindClosestAllowedIntervalMS

func FindClosestAllowedIntervalMS(intervalMs int64, allowedTimeGrains []int64) int64

FindClosestAllowedIntervalMS is used for the auto time grain setting. It finds the closest time grain from the list of allowed time grains for Azure Monitor using the Grafana interval in milliseconds Some metrics only allow a limited list of time grains. The allowedTimeGrains parameter allows overriding the default list of allowed time grains.

func SetAutoTimeGrain

func SetAutoTimeGrain(intervalMs int64, timeGrains []int64) (string, error)

SetAutoTimeGrain tries to find the closest interval to the query's intervalMs value if the metric has a limited set of possible intervals/time grains then use those instead of the default list of intervals

Types

type TimeGrain

type TimeGrain struct{}

TimeGrain handles conversions between the ISO 8601 Duration format (PT1H), Kbn units (1h) and Time Grains (1 hour) Also handles using the automatic Grafana interval to calculate a ISO 8601 Duration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL