Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextOrGroupOrInterrupt ¶
ContextOrGroupOrInterrupt blocks until one of 3 things happens: the context deadline is met (if one exists), the wait group's Wait() function naturally unblocks, or we receive a SIGINT/SIGTERM signal.
func InterruptSignal ¶
InterruptSignal creates a channel that will accept the next SIGTERM or SIGINT signal the OS sends to this process. This call does NOT block - it is up to you to "<-" in or out of a 'select' to actually control program flow.
func WithTimeout ¶
WithTimeout waits for the given wait group to complete normally unless the given amount of time has passed. This handles the case where you expect your test to do N number of things, and you expect that they'll finish at least in a certain amount of time.
WARNING: If your wait group does not ever finish, this will leak a channel, so you should only use this in unit tests where you expect the lifespan of the process to be short!
Types ¶
This section is empty.