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

# Packages

No description provided by the author

# Functions

NewComponentManagerBuilder returns a new ComponentManagerBuilder.
NoopWorker is a worker routine which is immediately ready, does nothing, and exits when the context is done.
RunComponent repeatedly starts components returned from the given ComponentFactory, shutting them down when they encounter irrecoverable errors and passing those errors to the given error handler.

# Constants

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

# Variables

ErrComponentShutdown is returned by a component which has already been shut down.

# Structs

ComponentManager is used to manage the worker routines of a Component, and implements all of the methods required by the Component interface, abstracting them away from individual implementations.

# Interfaces

Component represents a component which can be started and stopped, and exposes channels that close when startup and shutdown have completed.
ComponentManagerBuilder provides a mechanism for building a ComponentManager.

# Type aliases

No description provided by the author
ComponentWorker represents a worker routine of a component.
No description provided by the author
OnError reacts to an irrecoverable error It is meant to inspect the error, determining its type and seeing if e.g.
ReadyFunc is called within a ComponentWorker function to indicate that the worker is ready ComponentManager's Ready channel is closed when all workers are ready.