Documentation ¶
Overview ¶
Package processor contains logical message processors that can be pipelined within benthos using the pipeline.Processor type.
Index ¶
- func Descriptions() string
- type BlobToMulti
- type BoundsCheck
- type BoundsCheckConfig
- type Config
- type MultiToBlob
- type Type
- func New(conf Config, log log.Modular, stats metrics.Type) (Type, error)
- func NewBlobToMulti(conf Config, log log.Modular, stats metrics.Type) (Type, error)
- func NewBoundsCheck(conf Config, log log.Modular, stats metrics.Type) (Type, error)
- func NewMultiToBlob(conf Config, log log.Modular, stats metrics.Type) (Type, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Descriptions ¶
func Descriptions() string
Descriptions returns a formatted string of collated descriptions of each type.
Types ¶
type BlobToMulti ¶
type BlobToMulti struct {
// contains filtered or unexported fields
}
BlobToMulti is a processor that takes messages with a single part in a benthos multiple part blob format and decodes them into multiple part messages.
func (*BlobToMulti) ProcessMessage ¶
ProcessMessage takes a message with 1 part in multiple part blob format and returns a multiple part message by decoding it.
type BoundsCheck ¶
type BoundsCheck struct {
// contains filtered or unexported fields
}
BoundsCheck is a processor that checks each message against a set of bounds and rejects messages if they aren't within them.
func (*BoundsCheck) ProcessMessage ¶
ProcessMessage checks each message against a set of bounds.
type BoundsCheckConfig ¶
type BoundsCheckConfig struct { MaxParts int `json:"max_parts" yaml:"max_parts"` MinParts int `json:"min_parts" yaml:"min_parts"` MaxPartSize int `json:"max_part_size" yaml:"max_part_size"` }
BoundsCheckConfig contains any bounds configuration for the BoundsCheck processor.
func NewBoundsCheckConfig ¶
func NewBoundsCheckConfig() BoundsCheckConfig
NewBoundsCheckConfig returns a BoundsCheckConfig with default values.
type Config ¶
type Config struct { Type string `json:"type" yaml:"type"` BoundsCheck BoundsCheckConfig `json:"bounds_check" yaml:"bounds_check"` BlobToMulti struct{} `json:"blob_to_multi" yaml:"blob_to_multi"` MultiToBlob struct{} `json:"multi_to_blob" yaml:"multi_to_blob"` }
Config is the all encompassing configuration struct for all processor types.
func NewConfig ¶
func NewConfig() Config
NewConfig returns a configuration struct fully populated with default values.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON ensures that when parsing configs that are in a slice the default values are still applied.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML ensures that when parsing configs that are in a slice the default values are still applied.
type MultiToBlob ¶
type MultiToBlob struct { }
MultiToBlob is a processor that takes messages with potentially multiple parts and converts them into a single part message using the benthos binary format. This message can be converted back to multiple parts using the BlobToMulti processor.
func (MultiToBlob) ProcessMessage ¶
ProcessMessage takes a message of > 0 parts and returns a single part message that can be later converted back to the original parts.
type Type ¶
type Type interface { // ProcessMessage returns a message to be sent onwards, if the bool flag is // false then the message should be dropped. ProcessMessage(msg *types.Message) (*types.Message, bool) }
Type reads a message, performs a processing operation, and returns a message and a flag indicating whether that message should be propagated or not.
func NewBlobToMulti ¶
NewBlobToMulti returns a BlobToMulti processor.
func NewBoundsCheck ¶
NewBoundsCheck returns a BoundsCheck processor.