retain

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RetainOperator

type RetainOperator struct {
	helper.TransformerOperator
	Fields             []entry.Field
	AllBodyFields      bool
	AllAttributeFields bool
	AllResourceFields  bool
}

RetainOperator keeps the given fields and deletes the rest.

func (*RetainOperator) Process

func (p *RetainOperator) Process(ctx context.Context, entry *entry.Entry) error

Process will process an entry with a retain transformation.

func (*RetainOperator) Transform

func (p *RetainOperator) Transform(e *entry.Entry) error

Transform will apply the retain operation to an entry

type RetainOperatorConfig

type RetainOperatorConfig struct {
	helper.TransformerConfig `mapstructure:",squash" yaml:",inline"`
	Fields                   []entry.Field `mapstructure:"fields" json:"fields" yaml:"fields"`
}

RetainOperatorConfig is the configuration of a retain operator

func NewRetainOperatorConfig

func NewRetainOperatorConfig(operatorID string) *RetainOperatorConfig

NewRetainOperatorConfig creates a new retain operator config with default values

func (RetainOperatorConfig) Build

Build will build a retain operator from the supplied configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL