retain

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.53.0

type Config struct {
	helper.TransformerConfig `mapstructure:",squash"`
	Fields                   []entry.Field `mapstructure:"fields"`
}

Config is the configuration of a retain operator

func NewConfig added in v0.53.0

func NewConfig() *Config

NewConfig creates a new retain operator config with default values

func NewConfigWithID added in v0.59.0

func NewConfigWithID(operatorID string) *Config

NewConfigWithID creates a new retain operator config with default values

func (Config) Build added in v0.53.0

func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error)

Build will build a retain operator from the supplied configuration

type Transformer added in v0.53.0

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

Transformer keeps the given fields and deletes the rest.

func (*Transformer) Process added in v0.53.0

func (t *Transformer) Process(ctx context.Context, entry *entry.Entry) error

Process will process an entry with a retain transformation.

func (*Transformer) Transform added in v0.53.0

func (t *Transformer) Transform(e *entry.Entry) error

Transform will apply the retain operation to an entry

Jump to

Keyboard shortcuts

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