package
0.38.0-preview.0
Repository: https://github.com/onflow/flow-go.git
Documentation: pkg.go.dev

# Functions

AllClosed returns a channel that is closed when all input channels are closed.
AllDone calls Done on all input components and returns a channel that is closed when all input components are done.
AllReady calls Ready on all input components and returns a channel that is closed when all input components are ready.
CheckClosed checks if the provided channel has a signal or was closed.
No description provided by the author
DetypeSlice converts a typed slice containing any kind of elements into an untyped []any type, in effect removing the element type information from the slice.
LogProgress takes a total and return function such that when called adds the given number to the progress and logs the progress every 10% or every 60 seconds whichever comes first.
MergeChannels merges a list of channels into a single channel.
MergeReadyDone merges []module.ReadyDoneAware into one module.ReadyDoneAware.
No description provided by the author
No description provided by the author
SampleN computes a percentage of the given number 'n', and returns the result as an unsigned integer.
WaitClosed waits for either a signal/close on the channel or for the context to be cancelled Returns nil if the channel was signalled/closed before returning, otherwise, it returns the context error.
WaitError waits for either an error on the error channel or the done channel to close Returns an error if one is received on the error channel, otherwise it returns nil This handles a race condition where the done channel could have been closed as a result of an irrecoverable error being thrown, so that when the scheduler yields control back to this goroutine, both channels are available to read from.

# Structs

No description provided by the author
No description provided by the author

# Type aliases

LogProgressFunc is a function that can be called to add to the progress.
No description provided by the author