Documentation ¶
Index ¶
- Variables
- func FormatDuration(inter time.Duration) string
- func GetIntervalFrom(dsInterval, queryInterval string, queryIntervalMS int64, ...) (time.Duration, error)
- func NewCalculator(opts ...CalculatorOptions) *intervalCalculator
- func ParseIntervalStringToTimeDuration(interval string) (time.Duration, error)
- type Calculator
- type CalculatorOptions
- type Interval
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultRes int64 = 1500
)
Functions ¶
func FormatDuration ¶
FormatDuration converts a duration into the kbn format e.g. 1m 2h or 3d
func GetIntervalFrom ¶
func GetIntervalFrom(dsInterval, queryInterval string, queryIntervalMS int64, defaultInterval time.Duration) (time.Duration, error)
GetIntervalFrom returns the minimum interval. dsInterval is the string representation of data source min interval, if configured. queryInterval is the string representation of query interval (min interval), e.g. "10ms" or "10s". queryIntervalMS is a pre-calculated numeric representation of the query interval in milliseconds.
func NewCalculator ¶
func NewCalculator(opts ...CalculatorOptions) *intervalCalculator
Types ¶
type Calculator ¶
type CalculatorOptions ¶
Click to show internal directories.
Click to hide internal directories.