Documentation ¶
Index ¶
- Constants
- type Condition
- type ConditionAction
- type ConditionCase
- type Field
- type FieldApply
- type ProcessorFieldsWithCondition
- func (*ProcessorFieldsWithCondition) Description() string
- func (p *ProcessorFieldsWithCondition) Init(context ilogtail.Context) error
- func (p *ProcessorFieldsWithCondition) MatchAndProcess(log *protocol.Log) bool
- func (p *ProcessorFieldsWithCondition) ProcessLogs(logArray []*protocol.Log) []*protocol.Log
Constants ¶
View Source
const ( PluginName = "processor_fields_with_condition" RelationOperatorEquals = "equals" RelationOperatorRegexp = "regexp" RelationOperatorContains = "contains" RelationOperatorStartwith = "startwith" LogicalOperatorAnd = "and" LogicalOperatorOr = "or" ActionAddFieldsType = "processor_add_fields" ActionDropType = "processor_drop" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { Case ConditionCase `comment:"The condition that log data satisfies"` Actions []map[string]interface{} `comment:"The action that executes when the case condition is met"` // contains filtered or unexported fields }
type ConditionAction ¶
type ConditionAction struct { Type string `comment:"action type. alternate values are processor_add_fields/processor_drop"` IgnoreIfExist bool `comment:"Optional. Whether to ignore when the same key exists"` Fields map[string]interface{} `comment:"The appending fields"` DropKeys []interface{} `comment:"The dropping fields"` // contains filtered or unexported fields }
type ConditionCase ¶
type ConditionCase struct { LogicalOperator string `comment:"Optional. The Logical operators between multiple conditional fields, alternate values are and/or"` RelationOperator string `comment:"Optional. The Relational operators for conditional fields, alternate values are equals/regexp/contains/startwith"` FieldConditions map[string]string `comment:"The key-value pair of field names and expressions"` // contains filtered or unexported fields }
type FieldApply ¶
type ProcessorFieldsWithCondition ¶
type ProcessorFieldsWithCondition struct { DropIfNotMatchCondition bool `comment:"Optional. When the case condition is not met, whether the log is discarded (true) or retained (false)"` Switch []Condition `comment:"The switch-case conditions"` // contains filtered or unexported fields }
func (*ProcessorFieldsWithCondition) Description ¶
func (*ProcessorFieldsWithCondition) Description() string
func (*ProcessorFieldsWithCondition) Init ¶
func (p *ProcessorFieldsWithCondition) Init(context ilogtail.Context) error
Init called for init some system resources, like socket, mutex...
func (*ProcessorFieldsWithCondition) MatchAndProcess ¶
func (p *ProcessorFieldsWithCondition) MatchAndProcess(log *protocol.Log) bool
Match different cases
func (*ProcessorFieldsWithCondition) ProcessLogs ¶
func (p *ProcessorFieldsWithCondition) ProcessLogs(logArray []*protocol.Log) []*protocol.Log
Click to show internal directories.
Click to hide internal directories.