Documentation ¶
Index ¶
- type FilterOperator
- type FilterOperatorConfig
- type HostMetadata
- type HostMetadataConfig
- type K8sMetadataDecorator
- type K8sMetadataDecoratorConfig
- type MetadataCache
- type MetadataCacheEntry
- type MetadataOperator
- type MetadataOperatorConfig
- type NoopOperator
- type NoopOperatorConfig
- type Op
- type OpAdd
- type OpApplier
- type OpFlatten
- func (op *OpFlatten) Apply(e *entry.Entry) error
- func (op OpFlatten) MarshalJSON() ([]byte, error)
- func (op OpFlatten) MarshalYAML() (interface{}, error)
- func (op *OpFlatten) Type() string
- func (op *OpFlatten) UnmarshalJSON(raw []byte) error
- func (op *OpFlatten) UnmarshalYAML(unmarshal func(interface{}) error) error
- type OpMove
- type OpRemove
- func (op *OpRemove) Apply(e *entry.Entry) error
- func (op OpRemove) MarshalJSON() ([]byte, error)
- func (op OpRemove) MarshalYAML() (interface{}, error)
- func (op *OpRemove) Type() string
- func (op *OpRemove) UnmarshalJSON(raw []byte) error
- func (op *OpRemove) UnmarshalYAML(unmarshal func(interface{}) error) error
- type OpRetain
- func (op *OpRetain) Apply(e *entry.Entry) error
- func (op OpRetain) MarshalJSON() ([]byte, error)
- func (op OpRetain) MarshalYAML() (interface{}, error)
- func (op *OpRetain) Type() string
- func (op *OpRetain) UnmarshalJSON(raw []byte) error
- func (op *OpRetain) UnmarshalYAML(unmarshal func(interface{}) error) error
- type RateLimitConfig
- type RateLimitOperator
- type RestructureOperator
- type RestructureOperatorConfig
- type RouterOperator
- type RouterOperatorConfig
- type RouterOperatorRoute
- type RouterOperatorRouteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterOperator ¶
type FilterOperator struct { helper.TransformerOperator // contains filtered or unexported fields }
FilterOperator is an operator that filters entries based on matching expressions
type FilterOperatorConfig ¶
type FilterOperatorConfig struct { helper.TransformerConfig `yaml:",inline"` Expression string `json:"expr" yaml:"expr"` DropRatio float64 `json:"drop_ratio" yaml:"drop_ratio"` }
FilterOperatorConfig is the configuration of a filter operator
func NewFilterOperatorConfig ¶
func NewFilterOperatorConfig(operatorID string) *FilterOperatorConfig
NewFilterOperatorConfig creates a filter operator config with default values
func (FilterOperatorConfig) Build ¶
func (c FilterOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a filter operator from the supplied configuration
type HostMetadata ¶
type HostMetadata struct { helper.TransformerOperator helper.HostIdentifier }
HostMetadata is an operator that can add host metadata to incoming entries
type HostMetadataConfig ¶
type HostMetadataConfig struct { helper.TransformerConfig `yaml:",inline"` helper.HostIdentifierConfig `yaml:",inline"` }
HostMetadataConfig is the configuration of a host metadata operator
func NewHostMetadataConfig ¶
func NewHostMetadataConfig(operatorID string) *HostMetadataConfig
NewHostMetadataConfig returns a HostMetadataConfig with default values
func (HostMetadataConfig) Build ¶
func (c HostMetadataConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build an operator from the supplied configuration
type K8sMetadataDecorator ¶
type K8sMetadataDecorator struct { helper.TransformerOperator // contains filtered or unexported fields }
K8sMetadataDecorator is an operator for decorating entries with kubernetes metadata
func (*K8sMetadataDecorator) Process ¶
Process will process an entry received by the k8s_metadata_decorator operator
func (*K8sMetadataDecorator) Start ¶
func (k *K8sMetadataDecorator) Start() error
Start will start the k8s_metadata_decorator operator
type K8sMetadataDecoratorConfig ¶
type K8sMetadataDecoratorConfig struct { helper.TransformerConfig `yaml:",inline"` PodNameField entry.Field `json:"pod_name_field,omitempty" yaml:"pod_name_field,omitempty"` NamespaceField entry.Field `json:"namespace_field,omitempty" yaml:"namespace_field,omitempty"` CacheTTL operator.Duration `json:"cache_ttl,omitempty" yaml:"cache_ttl,omitempty"` Timeout operator.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"` }
K8sMetadataDecoratorConfig is the configuration of k8s_metadata_decorator operator
func NewK8sMetadataDecoratorConfig ¶
func NewK8sMetadataDecoratorConfig(operatorID string) *K8sMetadataDecoratorConfig
func (K8sMetadataDecoratorConfig) Build ¶
func (c K8sMetadataDecoratorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a k8s_metadata_decorator operator from the supplied configuration
type MetadataCache ¶
type MetadataCache struct {
// contains filtered or unexported fields
}
MetadataCache is a cache of kubernetes metadata
func (*MetadataCache) Load ¶
func (m *MetadataCache) Load(key string) (MetadataCacheEntry, bool)
Load will return an entry stored in the metadata cache
func (*MetadataCache) Store ¶
func (m *MetadataCache) Store(key string, entry MetadataCacheEntry)
Store will store an entry in the metadata cache
type MetadataCacheEntry ¶
type MetadataCacheEntry struct { ExpirationTime time.Time Labels map[string]string Annotations map[string]string }
MetadataCacheEntry is an entry in the metadata cache
type MetadataOperator ¶
type MetadataOperator struct { helper.TransformerOperator helper.Labeler helper.Identifier }
MetadataOperator is an operator that can add metadata to incoming entries
type MetadataOperatorConfig ¶
type MetadataOperatorConfig struct { helper.TransformerConfig `yaml:",inline"` helper.LabelerConfig `yaml:",inline"` helper.IdentifierConfig `yaml:",inline"` }
MetadataOperatorConfig is the configuration of a metadata operator
func NewMetadataOperatorConfig ¶
func NewMetadataOperatorConfig(operatorID string) *MetadataOperatorConfig
NewMetadataOperatorConfig creates a new metadata config with default values
func (MetadataOperatorConfig) Build ¶
func (c MetadataOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a metadata operator from the supplied configuration
type NoopOperator ¶
type NoopOperator struct {
helper.TransformerOperator
}
NoopOperator is an operator that performs no operations on an entry.
type NoopOperatorConfig ¶
type NoopOperatorConfig struct {
helper.TransformerConfig `yaml:",inline"`
}
NoopOperatorConfig is the configuration of a noop operator.
func NewNoopOperatorConfig ¶
func NewNoopOperatorConfig(operatorID string) *NoopOperatorConfig
func (NoopOperatorConfig) Build ¶
func (c NoopOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a noop operator.
type Op ¶
type Op struct {
OpApplier
}
Op is a designated operation on an entry
func (Op) MarshalJSON ¶
MarshalJSON will marshal an operation as JSON
func (Op) MarshalYAML ¶
MarshalYAML will marshal an operation as YAML
func (*Op) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into an operation
func (*Op) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into an operation
type OpAdd ¶
type OpAdd struct { Field entry.Field `json:"field" yaml:"field"` Value interface{} `json:"value,omitempty" yaml:"value,omitempty"` ValueExpr *string `json:"value_expr,omitempty" yaml:"value_expr,omitempty"` // contains filtered or unexported fields }
OpAdd is an operation for adding fields to an entry
func (*OpAdd) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into the add operation
func (*OpAdd) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into the add operation
type OpFlatten ¶
type OpFlatten struct {
Field entry.RecordField
}
OpFlatten is an operation for flattening fields
func (OpFlatten) MarshalJSON ¶
MarshalJSON will marshal a flatten operation into JSON
func (OpFlatten) MarshalYAML ¶
MarshalYAML will marshal a flatten operation into YAML
func (*OpFlatten) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a flatten operation
func (*OpFlatten) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a flatten operation
type OpMove ¶
type OpMove struct { From entry.Field `json:"from" yaml:"from,flow"` To entry.Field `json:"to" yaml:"to,flow"` }
OpMove is an operation for moving entry fields
type OpRemove ¶
OpRemove is operation for removing fields from an entry
func (OpRemove) MarshalJSON ¶
MarshalJSON will marshal a remove operation into JSON
func (OpRemove) MarshalYAML ¶
MarshalYAML will marshal a remove operation into YAML
func (*OpRemove) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a remove operation
func (*OpRemove) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a remove operation
type OpRetain ¶
OpRetain is an operation for retaining fields
func (OpRetain) MarshalJSON ¶
MarshalJSON will marshal a retain operation into JSON
func (OpRetain) MarshalYAML ¶
MarshalYAML will marshal a retain operation into YAML
func (*OpRetain) UnmarshalJSON ¶
UnmarshalJSON will unmarshal JSON into a retain operation
func (*OpRetain) UnmarshalYAML ¶
UnmarshalYAML will unmarshal YAML into a retain operation
type RateLimitConfig ¶
type RateLimitConfig struct { helper.TransformerConfig `yaml:",inline"` Rate float64 `json:"rate,omitempty" yaml:"rate,omitempty"` Interval operator.Duration `json:"interval,omitempty" yaml:"interval,omitempty"` Burst uint `json:"burst,omitempty" yaml:"burst,omitempty"` }
RateLimitConfig is the configuration of a rate filter operator.
func NewRateLimitConfig ¶
func NewRateLimitConfig(operatorID string) *RateLimitConfig
func (RateLimitConfig) Build ¶
func (c RateLimitConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a rate limit operator.
type RateLimitOperator ¶
type RateLimitOperator struct { helper.TransformerOperator // contains filtered or unexported fields }
RateLimitOperator is an operator that limits the rate of log consumption between operators.
func (*RateLimitOperator) Process ¶
Process will wait until a rate is met before sending an entry to the output.
func (*RateLimitOperator) Start ¶
func (p *RateLimitOperator) Start() error
Start will start the rate limit operator.
func (*RateLimitOperator) Stop ¶
func (p *RateLimitOperator) Stop() error
Stop will stop the rate limit operator.
type RestructureOperator ¶
type RestructureOperator struct { helper.TransformerOperator // contains filtered or unexported fields }
RestructureOperator is an operator that can restructure incoming entries using operations
type RestructureOperatorConfig ¶
type RestructureOperatorConfig struct { helper.TransformerConfig `yaml:",inline"` Ops []Op `json:"ops" yaml:"ops"` }
RestructureOperatorConfig is the configuration of a restructure operator
func NewRestructureOperatorConfig ¶
func NewRestructureOperatorConfig(operatorID string) *RestructureOperatorConfig
func (RestructureOperatorConfig) Build ¶
func (c RestructureOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a restructure operator from the supplied configuration
type RouterOperator ¶
type RouterOperator struct { helper.BasicOperator // contains filtered or unexported fields }
RouterOperator is an operator that routes entries based on matching expressions
func (*RouterOperator) CanOutput ¶
func (p *RouterOperator) CanOutput() bool
CanOutput will always return true for a router operator
func (*RouterOperator) CanProcess ¶
func (p *RouterOperator) CanProcess() bool
CanProcess will always return true for a router operator
func (*RouterOperator) Outputs ¶
func (p *RouterOperator) Outputs() []operator.Operator
Outputs will return all connected operators.
func (*RouterOperator) SetOutputs ¶
func (p *RouterOperator) SetOutputs(operators []operator.Operator) error
SetOutputs will set the outputs of the router operator.
type RouterOperatorConfig ¶
type RouterOperatorConfig struct { helper.BasicConfig `yaml:",inline"` Routes []*RouterOperatorRouteConfig `json:"routes" yaml:"routes"` }
RouterOperatorConfig is the configuration of a router operator
func NewRouterOperatorConfig ¶
func NewRouterOperatorConfig(operatorID string) *RouterOperatorConfig
func (RouterOperatorConfig) Build ¶
func (c RouterOperatorConfig) Build(context operator.BuildContext) (operator.Operator, error)
Build will build a router operator from the supplied configuration
func (*RouterOperatorConfig) SetNamespace ¶
func (c *RouterOperatorConfig) SetNamespace(namespace string, exclusions ...string)
SetNamespace will namespace the router operator and the outputs contained in its routes
type RouterOperatorRoute ¶
type RouterOperatorRoute struct { helper.Labeler Expression *vm.Program OutputIDs helper.OutputIDs OutputOperators []operator.Operator }
RouterOperatorRoute is a route on a router operator
type RouterOperatorRouteConfig ¶
type RouterOperatorRouteConfig struct { helper.LabelerConfig `yaml:",inline"` Expression string `json:"expr" yaml:"expr"` OutputIDs helper.OutputIDs `json:"output" yaml:"output"` }
RouterOperatorRouteConfig is the configuration of a route on a router operator
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
filter
module
|
|
hostmetadata
module
|
|
k8smetadata
module
|
|
metadata
module
|
|
ratelimit
module
|
|
restructure
module
|
|
router
module
|