cli

package
v4.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	DateBuilt string
)

Build stamps.

Functions

func OptAddStringFlag

func OptAddStringFlag(name, usage string, aliases []string, value string, destination *string) func()

OptAddStringFlag registers a custom CLI flag for the standard Benthos run command.

func OptSetVersionStamp

func OptSetVersionStamp(version, dateBuilt string) func()

OptSetVersionStamp creates an opt func for setting the version and date built stamps that Benthos returns via --version and the /version endpoint.

func OptUseContext

func OptUseContext(ctx context.Context) func()

OptUseContext sets a context to be used for cancellation during the run command. This adds one extra mechanism for graceful termination.

func Run

func Run()

Run the Benthos service, if the pipeline is started successfully then this call blocks until either the pipeline shuts down or a termination signal is received.

func RunWithOpts

func RunWithOpts(opts ...func())

RunWithOpts runs the Benthos service after first applying opt funcs, which are used for specify service customisations.

Types

This section is empty.

Directories

Path Synopsis
Package test implements the Benthos service unit testing command.
Package test implements the Benthos service unit testing command.

Jump to

Keyboard shortcuts

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