Documentation ¶
Index ¶
- Variables
- func GetLogKey() string
- type Converter
- type Directive
- type Filter
- type Flow
- type FlowMatch
- type FlowRoute
- type FluentConfig
- type GenericDirective
- type Input
- type Output
- type OutputPlugin
- type Params
- type PluginMeta
- type PluginParam
- type PluginParams
- type Router
- type StructToStringMapper
- type System
- type SystemBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var ContainerRuntime = "containerd"
Functions ¶
Types ¶
type Directive ¶
type Directive interface { GetPluginMeta() *PluginMeta GetParams() Params GetSections() []Directive }
func NewCopyDirective ¶
func NewFlatDirective ¶
func NewFlatDirective(meta PluginMeta, config interface{}, secretLoader secret.SecretLoader) (Directive, error)
type Flow ¶
type Flow struct { PluginMeta //Flow id for metrics FlowID string // Chain of Filters that will process the event. Can be zero or more. Filters []Filter `json:"filters,omitempty"` // List of Outputs that will emit the event, at least one output is required. Outputs []Output `json:"outputs"` // Matches for select or exclude Matches []FlowMatch `json:"matches,omitempty"` // Fluentd label FlowLabel string `json:"-"` }
func (*Flow) GetPluginMeta ¶
func (f *Flow) GetPluginMeta() *PluginMeta
func (*Flow) GetSections ¶
func (*Flow) WithFilters ¶
func (*Flow) WithOutputs ¶
type FlowMatch ¶ added in v0.3.0
type FlowMatch struct { // Optional set of kubernetes labels Labels map[string]string `json:"labels,omitempty"` // Optional namespace Namespaces []string `json:"namespaces,omitempty"` // ContainerNames ContainerNames []string `json:"container_names,omitempty"` // Hosts Hosts []string `json:"hosts,omitempty"` // Negate Negate bool `json:"negate,omitempty"` }
func (FlowMatch) GetPluginMeta ¶ added in v0.3.0
func (f FlowMatch) GetPluginMeta() *PluginMeta
func (FlowMatch) GetSections ¶ added in v0.3.0
type FlowRoute ¶
type FlowRoute struct { PluginMeta Params Params Matches []Directive }
func (*FlowRoute) GetPluginMeta ¶
func (f *FlowRoute) GetPluginMeta() *PluginMeta
func (*FlowRoute) GetSections ¶
type FluentConfig ¶
type FluentConfig interface {
GetDirectives() []Directive
}
type GenericDirective ¶
type GenericDirective struct { PluginMeta Params Params `json:"params,omitempty"` SubDirectives []Directive `json:"sections,omitempty"` }
func (*GenericDirective) GetParams ¶
func (d *GenericDirective) GetParams() Params
func (*GenericDirective) GetPluginMeta ¶
func (d *GenericDirective) GetPluginMeta() *PluginMeta
func (*GenericDirective) GetSections ¶
func (d *GenericDirective) GetSections() []Directive
type OutputPlugin ¶
type OutputPlugin = GenericDirective
type PluginMeta ¶
type PluginParam ¶
func Value ¶
func Value(value string) *PluginParam
type PluginParams ¶
type PluginParams map[string]*PluginParam
func (PluginParams) Equals ¶
func (p PluginParams) Equals(target PluginParams) error
Equals check for exact matching of 2 PluginParams by Values
type Router ¶
type Router struct { PluginMeta Routes []Directive `json:"routes"` Params Params }
OutputPlugin plugin: https://github.com/banzaicloud/fluent-plugin-label-router
func (*Router) GetPluginMeta ¶
func (r *Router) GetPluginMeta() *PluginMeta
func (*Router) GetSections ¶
type StructToStringMapper ¶
type StructToStringMapper struct { TagName string PluginTagName string ConversionHooks map[string]Converter SecretLoader secret.SecretLoader }
func NewStructToStringMapper ¶
func NewStructToStringMapper(secretLoader secret.SecretLoader) *StructToStringMapper
func (*StructToStringMapper) StringsMap ¶
func (s *StructToStringMapper) StringsMap(in interface{}) (map[string]string, error)
func (*StructToStringMapper) WithConverter ¶
func (s *StructToStringMapper) WithConverter(name string, c Converter) *StructToStringMapper
type System ¶
type System struct { Input Input `json:"input"` GlobalFilters []Filter `json:"globalFilters"` Router *Router `json:"router"` Flows []*Flow `json:"flows"` }
func (*System) GetDirectives ¶
type SystemBuilder ¶ added in v0.6.1
type SystemBuilder struct {
// contains filtered or unexported fields
}
func NewSystemBuilder ¶ added in v0.6.1
func NewSystemBuilder(input Input, globalFilers []Filter, router *Router) *SystemBuilder
func (*SystemBuilder) Build ¶ added in v0.6.1
func (s *SystemBuilder) Build() (*System, error)
func (*SystemBuilder) RegisterDefaultFlow ¶ added in v0.6.1
func (s *SystemBuilder) RegisterDefaultFlow(f *Flow) error
func (*SystemBuilder) RegisterErrorFlow ¶ added in v0.7.8
func (s *SystemBuilder) RegisterErrorFlow(f *Flow) error
Check if we need to register a flow at all?
func (*SystemBuilder) RegisterFlow ¶ added in v0.6.1
func (s *SystemBuilder) RegisterFlow(f *Flow) error
Click to show internal directories.
Click to hide internal directories.