Documentation
¶
Overview ¶
Package supervised provides basic supervision abilities for running goroutines, namely making sure that panics are not swallowed and that long-running goroutines are restarted if they crash
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextEndedChan ¶
type ContextEndedChan chan struct{}
func GoForever ¶
func GoForever(ctx context.Context, logger Errorer, f func()) ContextEndedChan
Runs f() in a new goroutine; if it panics, logs the error and stack trace to the specified Errorer If the provided Context isn't closed, re-runs f() Returns a channel that is closed when the goroutine has quit due to context ending
Click to show internal directories.
Click to hide internal directories.