Documentation ¶
Overview ¶
Package interop provides utilities for initializing Benthos components that default to the old APIs, but when the provided manager supports it the new APIs are used.
TODO: V4 Remove this package
Index ¶
- func AccessCache(ctx context.Context, mgr types.Manager, name string, fn func(types.Cache)) error
- func AccessInput(ctx context.Context, mgr types.Manager, name string, fn func(types.Input)) error
- func AccessOutput(ctx context.Context, mgr types.Manager, name string, ...) error
- func AccessProcessor(ctx context.Context, mgr types.Manager, name string, fn func(types.Processor)) error
- func AccessRateLimit(ctx context.Context, mgr types.Manager, name string, fn func(types.RateLimit)) error
- func GetLabel(mgr types.Manager) string
- func LabelChild(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
- func LabelRoot(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
- func LabelStream(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
- func ProbeCache(ctx context.Context, mgr types.Manager, name string) error
- func ProbeInput(ctx context.Context, mgr types.Manager, name string) error
- func ProbeOutput(ctx context.Context, mgr types.Manager, name string) error
- func ProbeProcessor(ctx context.Context, mgr types.Manager, name string) error
- func ProbeRateLimit(ctx context.Context, mgr types.Manager, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessCache ¶ added in v3.47.0
AccessCache attempts to access a cache resource by a unique identifier and executes a closure function with the cache as an argument. Returns an error if the cache does not exist (or is otherwise inaccessible).
func AccessInput ¶ added in v3.47.0
AccessInput attempts to access an input resource by a unique identifier and executes a closure function with the input as an argument. Returns an error if the input does not exist (or is otherwise inaccessible).
func AccessOutput ¶ added in v3.47.0
func AccessOutput(ctx context.Context, mgr types.Manager, name string, fn func(types.OutputWriter)) error
AccessOutput attempts to access an output resource by a unique identifier and executes a closure function with the output as an argument. Returns an error if the output does not exist (or is otherwise inaccessible).
func AccessProcessor ¶ added in v3.47.0
func AccessProcessor(ctx context.Context, mgr types.Manager, name string, fn func(types.Processor)) error
AccessProcessor attempts to access a processor resource by a unique identifier and executes a closure function with the processor as an argument. Returns an error if the processor does not exist (or is otherwise inaccessible).
func AccessRateLimit ¶ added in v3.47.0
func AccessRateLimit(ctx context.Context, mgr types.Manager, name string, fn func(types.RateLimit)) error
AccessRateLimit attempts to access a rate limit resource by a unique identifier and executes a closure function with the rate limit as an argument. Returns an error if the rate limit does not exist (or is otherwise inaccessible).
func GetLabel ¶
GetLabel attempts the extract the current label of a component by obtaining it from a manager. If the manager does not support label methods then it instead falls back to a UUID, and somehow failing that returns an empty string.
func LabelChild ¶
func LabelChild(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
LabelChild expands the label of the provided observability components.
func LabelRoot ¶
func LabelRoot(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
LabelRoot replaces the label of the provided observability components.
func LabelStream ¶
func LabelStream(label string, mgr types.Manager, logger log.Modular, stats metrics.Type) (types.Manager, log.Modular, metrics.Type)
LabelStream expands the label of the provided observability components with a stream identifier.
func ProbeCache ¶ added in v3.47.0
ProbeCache checks whether a cache resource has been configured, and returns an error if not.
func ProbeInput ¶ added in v3.47.0
ProbeInput checks whether an input resource has been configured, and returns an error if not.
func ProbeOutput ¶ added in v3.47.0
ProbeOutput checks whether an output resource has been configured, and returns an error if not.
func ProbeProcessor ¶ added in v3.47.0
ProbeProcessor checks whether a processor resource has been configured, and returns an error if not.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package plugins provides a way to have the new components for plugins-v2 able to access and "pull" the old style plugins without introducing cyclic dependencies.
|
Package plugins provides a way to have the new components for plugins-v2 able to access and "pull" the old style plugins without introducing cyclic dependencies. |