fanin

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errors

func Errors(errs ...<-chan error) (_ <-chan error, stop func())

Errors accepts multiple error channels and returns a single error channel. When the returned stop function is called or every input channel is closed, the returned error channel is closed.

If len(errs) == 0, Errors returns a closed error channel.

Multiple calls to stop have no effect.

func ErrorsContext

func ErrorsContext(ctx context.Context, errs ...<-chan error) <-chan error

Errors accepts a Context and multiple error channels and returns a single error channel. When ctx is canceled or every input channel is closed, the returned error channel is closed.

If len(errs) == 0, Errors returns a closed error channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL