Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collect ¶
func Collect(ctx context.Context, cancel func(), errChan chan error, valuesChan chan interface{}) ([]interface{}, error)
Collect collects errors and values from channel provided, honouring timeout it will expect exactly cap(errChan) messages value channel could be nil. If not nil, then cap(errCh) == cap(valueCh) it will also cancel context on first error occured if cancel func is not nil
func CollectErrors ¶
CollectErrors exhausts error channel errChan up to its capacity and returns aggregate error if any
func IsContextCancelledError ¶
IsContextCancelledError returns true if the given error is a context cancelled error
Types ¶
type SafeByteBuffer ¶
type SafeByteBuffer struct {
// contains filtered or unexported fields
}
SafeByteBuffer is a goroutine safe bytes.Buffer
func (*SafeByteBuffer) String ¶
func (s *SafeByteBuffer) String() string
String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns "<nil>".
Click to show internal directories.
Click to hide internal directories.