time

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateISO8601DurationFromIntervalMS

func CreateISO8601DurationFromIntervalMS(it int64) (string, error)

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

This section is empty.

Jump to

Keyboard shortcuts

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