Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ARGS map[string]interface{}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Condition to produce metric
// See syntax here: https://expr-lang.org/docs/language-definition
Condition string `toml:"condition"`
}
Config is a struct that define output condition expression.
type Expression ¶
type Expression interface {
// Match test if the event match the conditional expression
Match(event events.Event) bool
// String returns condition as text
String() string
}
Serializer is an interface defining functions that a serializer plugin must satisfy.
func NewConditionalExpression ¶
func NewConditionalExpression(config *Config) (Expression, error)
NewConditionalExpression creat a conditional Output interface based on the given config.
type Output ¶
type Output interface {
// SetCondition sets the condition expression for the interface.
SetCondition(condition Expression)
}
Output is an interface for output plugins that are conditioned to an expression.
Click to show internal directories.
Click to hide internal directories.