ExTeal.Metric.Ranges (ExTeal v0.21.0) View Source

Helper functions for building time intervals and queries based on the params of a request.

Link to this section Summary

Functions

Set the boundaries of an aggregate queries

Parse the start and end params

Link to this section Types

Specs

between_options() :: [
  start_dt: DateTime.t(),
  end_dt: DateTime.t(),
  metric: module()
]

Link to this section Functions

Specs

Set the boundaries of an aggregate queries

Link to this function

get_aggregate_datetimes(request)

View Source

Specs

get_aggregate_datetimes(request :: ExTeal.Metric.Request.t()) ::
  {start_dt :: DateTime.t(), end_dt :: DateTime.t()}

Parse the start and end params

Link to this function

parse_dt(param, format, timezone)

View Source

Specs

parse_dt(String.t(), String.t(), String.t()) :: DateTime.t()