Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TimeStore ¶
type TimeStore struct {
// Underlying data store
sync.Map
// contains filtered or unexported fields
}
TimeStore{} stores arbitrary time.Time. It allows for safe pushes and pops based on any arbitrary keys.
func NewTimeStore ¶
NewDurationStore() returns a time store which will evaluate which value to keep, when multiple are pushed to the same key, based on the eval() function.
func (*TimeStore) Peek ¶
Peek() will return the time stored by the key and *not* delete the store. If no time was stored for that key, then 0 will be returned.
Click to show internal directories.
Click to hide internal directories.