Documentation ¶
Index ¶
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(dsInfo *datasources.DataSource, queryModel *simplejson.Json, defaultInterval time.Duration) (time.Duration, error)
func NewCalculator ¶
func NewCalculator(opts ...CalculatorOptions) *intervalCalculator
Types ¶
type Calculator ¶
type Calculator interface { Calculate(timeRange legacydata.DataTimeRange, interval time.Duration) Interval CalculateSafeInterval(timeRange legacydata.DataTimeRange, resolution int64) Interval }
type CalculatorOptions ¶
Click to show internal directories.
Click to hide internal directories.