Documentation ¶
Index ¶
- type Config
- type Route
- type RouteConfig
- type Transformer
- func (t *Transformer) CanOutput() bool
- func (t *Transformer) CanProcess() bool
- func (t *Transformer) GetOutputIDs() []string
- func (t *Transformer) Outputs() []operator.Operator
- func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error
- func (t *Transformer) SetOutputIDs(_ []string)
- func (t *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 (t *Transformer) CanOutput() bool
CanOutput will always return true for a router operator
func (*Transformer) CanProcess ¶ added in v0.53.0
func (t *Transformer) CanProcess() bool
CanProcess will always return true for a router operator
func (*Transformer) GetOutputIDs ¶ added in v0.53.0
func (t *Transformer) GetOutputIDs() []string
GetOutputIDs will return all connected operators.
func (*Transformer) Outputs ¶ added in v0.53.0
func (t *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 (t *Transformer) SetOutputIDs(_ []string)
SetOutputIDs will do nothing.
func (*Transformer) SetOutputs ¶ added in v0.53.0
func (t *Transformer) SetOutputs(operators []operator.Operator) error
SetOutputs will set the outputs of the router operator.