package
4.41.0
Repository: https://github.com/redpanda-data/benthos.git
Documentation: pkg.go.dev

# Functions

CreateLogger from a CLI context and a stream config.
CreateManager from a CLI context and a stream config.
DelayShutdown attempts to block until either: - The delay period ends - The provided context is cancelled - The process receives an interrupt or sigterm.
EnvFileAndTemplateFlags represents env file and template flags that are used by some subcommands.
NewCLIOpts returns a new CLIOpts instance populated with default values.
NewSwappableStopper creates a new swappable stopper resource around an initial stoppable.
PreApplyEnvFilesAndTemplates takes a cli context and checks for flags `env-file` and `templates` in order to parse and execute them before the CLI proceeds onto the next behaviour.
ReadConfig attempts to read a general service wide config via a returned config.Reader based on input CLI flags.
RunFlags is the full set of root level flags that have been deprecated and are now documented at each subcommand that requires them.
RunManagerUntilStopped will run the provided HTTP server and block until either a provided stream stoppable is gracefully terminated (via the dataStreamClosedChan) or a signal is given to the process to terminate, at which point the provided HTTP server, the manager, and the stoppable is stopped according to the configured shutdown timeout.
RunService runs a service command (either the default or the streams subcommand).

# Constants

Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.
Common names for old root level flags.

# Structs

CLIOpts contains the available CLI configuration options.
ErrExitCode is an error that could be returned by the cli application in order to indicate that a given exit code should be returned by the process.
RootCommonFlags represents a collection of flags that could be set at the root of the cli, even in the case of a subcommand being specified afterwards.
StoppableManager wraps a manager and API type that potentially outlives one or more dependent streams and encapsulates the logic for shutting them down within the deadline of a given context.
SwappableStopper wraps an active Stoppable resource in a mechanism that allows changing the resource for something else after stopping it.

# Interfaces

RunningStream represents a resource (a Benthos stream or a streams mode manager) that can be stopped.

# Type aliases

StreamInitFunc is an optional func to be called when a stream (or streams mode) is initialised.