Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Restrictive = restrictive{} Permissive = permissive{} AddOne = Restrictive.AddOne Done = Restrictive.Done Wait = Restrictive.Wait WaitWithTimeout = Restrictive.WaitWWithTimeout Go = Restrictive.Go )
Functions ¶
func Background ¶
func RecoverTimeout ¶ added in v0.6.0
func RecoverTimeout()
Types ¶
type PermissiveContext ¶
type RestrictiveContext ¶
type WaitContextInterface ¶
type WaitContextInterface interface { AddOne(ctx context.Context) Done(ctx context.Context) Wait(ctx context.Context, notifyAfter ...time.Duration) // Go runs the given function in a background goroutine, and adds it to the // WaitContext. Shorthand for the following pattern: // waitctx.AddOne(ctx) // go func() { // defer waitctx.Done(ctx) // // do stuff // }() Go(ctx context.Context, fn func()) }
Click to show internal directories.
Click to hide internal directories.