Documentation ¶
Index ¶
- type Config
- type Route
- type RouteConfig
- type Transformer
- func (p *Transformer) CanOutput() bool
- func (p *Transformer) CanProcess() bool
- func (p *Transformer) GetOutputIDs() []string
- func (p *Transformer) Outputs() []operator.Operator
- func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error
- func (p *Transformer) SetOutputIDs(_ []string)
- func (p *Transformer) SetOutputs(operators []operator.Operator) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.53.0
type Config struct { helper.BasicConfig `mapstructure:",squash"` Routes []*RouteConfig `mapstructure:"routes"` Default []string `mapstructure:"default"` }
Config is the configuration of a router operator
func NewConfig ¶ added in v0.53.0
func NewConfig() *Config
NewConfig config creates a new router operator config with default values
func NewConfigWithID ¶ added in v0.59.0
NewConfigWithID config creates a new router operator config with default values
type Route ¶ added in v0.53.0
type Route struct { helper.Attributer Expression *vm.Program OutputIDs []string OutputOperators []operator.Operator }
Route is a route on a router operator
type RouteConfig ¶ added in v0.53.0
type RouteConfig struct { helper.AttributerConfig `mapstructure:",squash"` Expression string `mapstructure:"expr"` OutputIDs []string `mapstructure:"output"` }
RouteConfig is the configuration of a route on a router operator
type Transformer ¶ added in v0.53.0
type Transformer struct { helper.BasicOperator // contains filtered or unexported fields }
Transformer is an operator that routes entries based on matching expressions
func (*Transformer) CanOutput ¶ added in v0.53.0
func (p *Transformer) CanOutput() bool
CanOutput will always return true for a router operator
func (*Transformer) CanProcess ¶ added in v0.53.0
func (p *Transformer) CanProcess() bool
CanProcess will always return true for a router operator
func (*Transformer) GetOutputIDs ¶ added in v0.53.0
func (p *Transformer) GetOutputIDs() []string
GetOutputIDs will return all connected operators.
func (*Transformer) Outputs ¶ added in v0.53.0
func (p *Transformer) Outputs() []operator.Operator
Outputs will return all connected operators.
func (*Transformer) Process ¶ added in v0.53.0
Process will route incoming entries based on matching expressions
func (*Transformer) SetOutputIDs ¶ added in v0.53.0
func (p *Transformer) SetOutputIDs(_ []string)
SetOutputIDs will do nothing.
func (*Transformer) SetOutputs ¶ added in v0.53.0
func (p *Transformer) SetOutputs(operators []operator.Operator) error
SetOutputs will set the outputs of the router operator.