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 ¶ added in v2.0.4
func NewTimeList() *timeList
Types ¶
type Wait ¶
func NewWithResponse ¶ added in v2.3.0
func NewWithResponse(ch <-chan interface{}) Wait
type WaitTime ¶ added in v2.0.4
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.