Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDateUTC ¶
FormatDateUTC returns t in UTC as a string with the format YYYY-MM-DD.
Types ¶
type WindowIterator ¶
type WindowIterator struct { Cursor clock.SimpleIntervalClock End time.Time }
WindowIterator iterates through windows of a range of time. Must be initialized with NewWindowIterator().
func NewWindowIterator ¶
func NewWindowIterator(tr Range, window time.Duration) (*WindowIterator, error)
NewWindowIterator returns an initialized *WindowIterator.
func (*WindowIterator) More ¶
func (i *WindowIterator) More() bool
More() returns true if Next() has more to return.
func (*WindowIterator) Next ¶
func (i *WindowIterator) Next() (Range, error)
Next() returns a time range covering the next window of time. The start time is inclusive and the end time is exclusive. Returns an error if More() returns false.
Click to show internal directories.
Click to hide internal directories.