filtertypeconv

package
v0.0.0-...-c13075e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const ErrorTag = "gogstash_filter_typeconv_error"

ErrorTag tag added to event when process typeconv failed

View Source
const ModuleName = "typeconv"

ModuleName is the name used in config file

Variables

View Source
var (
	ErrorInvalidConvType1 = errutil.NewFactory(`%q is not one of ["string", "int64", "float64"]`)
)

Errors

Functions

func InitHandler

func InitHandler(
	ctx context.Context,
	raw config.ConfigRaw,
	control config.Control,
) (config.TypeFilterConfig, error)

InitHandler initialize the filter plugin

Types

type FilterConfig

type FilterConfig struct {
	config.FilterConfig

	ConvType string   `json:"conv_type"` // one of ["string", "int64", "float64"]
	Fields   []string `json:"fields"`    // fields to convert type
}

FilterConfig holds the configuration json fields and internal objects

func DefaultFilterConfig

func DefaultFilterConfig() FilterConfig

DefaultFilterConfig returns an FilterConfig struct with default values

func (*FilterConfig) Event

Event the main filter event

Jump to

Keyboard shortcuts

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