set

package
v0.0.0-...-31600e6 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Code generated by processor/generate.go - DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The origin field which will be copied to target_field.
	CopyFrom string `config:"copy_from"`

	// Ignore failures for the processor.
	IgnoreFailure bool `config:"ignore_failure"`

	// If true and field does not exist or is null, the processor quietly
	// returns without modifying the document.
	IgnoreMissing bool `config:"ignore_missing"`

	// The field to assign the output value to, by default field is updated
	// in-place.
	TargetField string `config:"target_field"`

	// The value to be set for the field.
	Value config.EventValue `config:"value"`
}

Config contains the configuration options for the set processor.

func (*Config) InitDefaults

func (c *Config) InitDefaults()

InitDefaults initializes the configuration options to their default values.

type Set

type Set struct {
	// contains filtered or unexported fields
}

Sets one field and associates it with the specified value. If the field already exists, its value will be replaced with the provided one.

func New

func New(config Config) (*Set, error)

New returns a new Set processor.

func (*Set) Config

func (p *Set) Config() Config

Config returns the Set processor config.

func (*Set) Process

func (p *Set) Process(evt processor.Event) error

func (*Set) String

func (p *Set) String() string

Jump to

Keyboard shortcuts

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