Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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. The traditional way of setting these values is via the build flags: -X github.com/benthosdev/benthos/v4/internal/old/service.Version=$(VERSION) and -X github.com/benthosdev/benthos/v4/internal/old/service.DateBuilt=$(DATE)
func OptUseContext ¶
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.