Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpiredItem ¶
ExpiredItem represents an expired item returned from the Watcher
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher watches the expiration of items
func New ¶
New instantiates a new expiration watcher. An expiration buffer (positive or negative) can be specified, causing items to be deemed expired some time before or after their expiration reaches current UTC time. A positive expirationBuffer will make the item expire sooner then UTC, and a negative buffer after.
func (*Watcher) ExpiredItems ¶
func (w *Watcher) ExpiredItems() <-chan []ExpiredItem
ExpiredItems returns a read-only channel that can be used to listen for expired items. The channel will be closed if/when the watcher is done watching.
Click to show internal directories.
Click to hide internal directories.