Documentation ¶
Overview ¶
Package wait provides utility functions for polling, listening using Go channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTimeList ¶
func NewTimeList() *timeList
Types ¶
type Wait ¶
func NewWithResponse ¶
func NewWithResponse(ch <-chan interface{}) Wait
type WaitRecorder ¶
func NewRecorder ¶
func NewRecorder() *WaitRecorder
type WaitTime ¶
type WaitTime interface { // Wait returns a chan that waits on the given deadline. // The chan will be triggered when Trigger is called with a // deadline that is later than the one it is waiting for. // The given deadline MUST be unique. The deadline should be // retrieved by calling time.Now() in most cases. Wait(deadline time.Time) <-chan struct{} // Trigger triggers all the waiting chans with an earlier deadline. Trigger(deadline time.Time) }
Click to show internal directories.
Click to hide internal directories.