Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessGroup ¶
type ProcessGroup struct {
// contains filtered or unexported fields
}
ProcessGroup is an errgroup that listens for OS process signals
func NewProcessGroup ¶
func NewProcessGroup(outerCtx context.Context) *ProcessGroup
NewProcessGroup creates a new ProcessGroup
func (*ProcessGroup) Context ¶
func (gw *ProcessGroup) Context() context.Context
Context returns the context used by the ProcessGroup
func (*ProcessGroup) Go ¶
func (gw *ProcessGroup) Go(f func() error)
Go calls the given function in a new goroutine.
The first call to return a non-nil error cancels the group; its error will be returned by Wait.
func (*ProcessGroup) Wait ¶
func (gw *ProcessGroup) Wait() error
Wait blocks until all function calls from the Go method have returned, then returns the first non-nil error (if any) from them.
Click to show internal directories.
Click to hide internal directories.