Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrCenter ¶
type ErrCenter struct {
// contains filtered or unexported fields
}
ErrCenter is used to receive errors and provide ways to detect the error(s).
func (*ErrCenter) CheckError ¶
CheckError retusn the recorded error
func (*ErrCenter) OnError ¶
OnError receivers an error, if the error center has received one, drops the new error and records a warning log. Otherwise the error will be recorded and doneCh will be closed to use as notification.
func (*ErrCenter) WithCancelOnFirstError ¶
func (c *ErrCenter) WithCancelOnFirstError(ctx context.Context) (context.Context, context.CancelFunc)
WithCancelOnFirstError creates an error context which will cancel the context when the first error is received.
Click to show internal directories.
Click to hide internal directories.