Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct {
// Transport specifies the underlying transport protocol for the API HTTP server.
Transport string `json:"api.transport" yaml:"api.transport"`
// Timeout determines the timeout for the API server responses
Timeout time.Duration `json:"api.timeout" yaml:"api.timeout"`
}
APIConfig contains API specific config options.
type FilamentConfig ¶
FilamentConfig stores config parameters for tweaking the behaviour of the filament engine.
type FilterConfig ¶ added in v1.4.0
type FilterConfig struct {
Name string `json:"name" yaml:"name"`
Def string `json:"def" yaml:"def"`
Action string `json:"action" yaml:"action"`
}
FilterConfig is the descriptor of a single filter.
type FilterGroup ¶ added in v1.4.0
type FilterGroup struct {
Name string `json:"group" yaml:"group"`
Enabled bool `json:"enabled" yaml:"enabled"`
Selector FilterGroupSelector `json:"selector" yaml:"selector"`
Policy FilterGroupPolicy `json:"policy" yaml:"policy"`
Relation FilterGroupRelation `json:"relation" yaml:"relation"`
FromStrings []*FilterConfig `json:"from-strings" yaml:"from-strings"`
Tags []string `json:"tags" yaml:"tags"`
}
FilterGroup represents the container for filters.
type FilterGroupPolicy ¶ added in v1.4.0
type FilterGroupPolicy uint8
FilterGroupPolicy is the type alias for the filter group policy
const ( // IncludePolicy determines the policy type that allows for // filtering the matching events. IncludePolicy FilterGroupPolicy = iota // ExcludePolicy determines the policy that allows for filtering // out the matching events, that is, discarding them from the event // flow. ExcludePolicy // UnknownPolicy determines the unknown group policy type. UnknownPolicy )
func (FilterGroupPolicy) String ¶ added in v1.4.0
func (p FilterGroupPolicy) String() string
String yields human readable group policy.
func (*FilterGroupPolicy) UnmarshalYAML ¶ added in v1.4.0
func (p *FilterGroupPolicy) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts the policy string to enum type.
type FilterGroupRelation ¶ added in v1.4.0
type FilterGroupRelation uint8
FilterGroupRelation is the type alias for the filter group relation
const ( // OrRelation is the group relation type that requires at // least one matching filter to evaluate successfully. OrRelation FilterGroupRelation = iota // AndRelation is the group relation type that requires that // all the filters to match in order to evaluate successfully. AndRelation // UnknownRelation determines the unknown group relation type. UnknownRelation )
func (FilterGroupRelation) String ¶ added in v1.4.0
func (r FilterGroupRelation) String() string
String yields human readable group relation.
func (*FilterGroupRelation) UnmarshalYAML ¶ added in v1.4.0
func (r *FilterGroupRelation) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts the relation string to enum type.
type FilterGroupSelector ¶ added in v1.4.0
type FilterGroupSelector struct {
Type ktypes.Ktype `json:"type" yaml:"type"`
Category ktypes.Category `json:"category" yaml:"category"`
}
FilterGroupSelector permits specifying the events that will be captured by particular filter group. Only one of type or category selectors can be active at the same time.
type Filters ¶ added in v1.4.0
type Filters struct {
Rules Rules `json:"rules" yaml:"rules"`
}
Filters contains references to filter group definitions. Each filter group can contain multiple filter expressions. Filter expressions can reside in the filter group file or live in a separate file.
func (Filters) LoadGroups ¶ added in v1.4.0
func (f Filters) LoadGroups() ([]FilterGroup, error)
LoadGroups for each filter group file it decodes the groups and ensures the correctness of the yaml file.
type Rules ¶ added in v1.4.0
type Rules struct {
FromPaths []string `json:"from-paths" yaml:"from-paths"`
FromURLs []string `json:"from-urls" yaml:"from-urls"`
}
Rules contains attributes that describe the location of rule resources.
type TmplData ¶ added in v1.4.0
type TmplData struct {
Filter *FilterConfig
Group *FilterGroup
Kevt *kevent.Kevent
}
TmplData is the template data object. Some fields of this structure represent empty values, since we have to satisfy the presence of certain keys when executing the template.