normalize

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ProcessorAdd = "add"
View Source
const ProcessorAddMeta = "addMeta"
View Source
const ProcessorConvert = "convert"
View Source
const ProcessorCopy = "copy"
View Source
const ProcessorDrop = "drop"
View Source
const ProcessorFmt = "fmt"
View Source
const ProcessorJsonDecode = "jsonDecode"
View Source
const ProcessorMove = "rename"
View Source
const ProcessorRegex = "regex"
View Source
const ProcessorSplit = "split"
View Source
const ProcessorTimestamp = "timestamp"
View Source
const ProcessorUnderRoot = "underRoot"
View Source
const SystemLogBody = "systemLogBody"
View Source
const Type = "normalize"

Variables

This section is empty.

Functions

func LogErrorWithIgnore added in v1.2.0

func LogErrorWithIgnore(ignore bool, format string, a ...interface{})

Types

type AddConfig

type AddConfig struct {
	Fields map[string]interface{} `yaml:"fields,omitempty" validate:"required"`
}

type AddMetaConfig

type AddMetaConfig struct {
	Target string `yaml:"target,omitempty" default:"meta"`
}

type AddMetaProcessor

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

func NewAddMetaProcessor

func NewAddMetaProcessor() *AddMetaProcessor

func (*AddMetaProcessor) Config

func (r *AddMetaProcessor) Config() interface{}

func (*AddMetaProcessor) GetName added in v1.3.0

func (r *AddMetaProcessor) GetName() string

func (*AddMetaProcessor) Init

func (r *AddMetaProcessor) Init(interceptor *Interceptor)

func (*AddMetaProcessor) Process

func (r *AddMetaProcessor) Process(e api.Event) error

type AddProcessor

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

func NewAddProcessor

func NewAddProcessor() *AddProcessor

func (*AddProcessor) Config

func (r *AddProcessor) Config() interface{}

func (*AddProcessor) GetName added in v1.3.0

func (r *AddProcessor) GetName() string

func (*AddProcessor) Init

func (r *AddProcessor) Init(interceptor *Interceptor)

func (*AddProcessor) Process

func (r *AddProcessor) Process(e api.Event) error

type Config

type Config struct {
	interceptor.ExtensionConfig `yaml:",inline"`
	Processors                  ProcessorConfig `yaml:"processors,omitempty"`
}

Config Deprecated, use transformer instead

func (*Config) Validate

func (c *Config) Validate() error

type Convert

type Convert struct {
	From string `yaml:"from,omitempty" validate:"required"`
	To   string `yaml:"to,omitempty" validate:"required"`
}

type ConvertConfig

type ConvertConfig struct {
	Convert []Convert `yaml:"convert,omitempty" validate:"required"`
}

type ConvertProcessor

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

func NewConvertProcessor

func NewConvertProcessor() *ConvertProcessor

func (*ConvertProcessor) Config

func (p *ConvertProcessor) Config() interface{}

func (*ConvertProcessor) GetName added in v1.3.0

func (p *ConvertProcessor) GetName() string

func (*ConvertProcessor) Init

func (p *ConvertProcessor) Init(interceptor *Interceptor)

func (*ConvertProcessor) Process

func (p *ConvertProcessor) Process(e api.Event) error

type CopyConfig

type CopyConfig struct {
	Convert []Convert `yaml:"convert,omitempty" validate:"required"`
}

type CopyProcessor

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

func NewCopyProcessor

func NewCopyProcessor() *CopyProcessor

func (*CopyProcessor) Config

func (r *CopyProcessor) Config() interface{}

func (*CopyProcessor) GetName added in v1.3.0

func (r *CopyProcessor) GetName() string

func (*CopyProcessor) Init

func (r *CopyProcessor) Init(interceptor *Interceptor)

func (*CopyProcessor) Process

func (r *CopyProcessor) Process(e api.Event) error

type DropConfig

type DropConfig struct {
	Targets []string `yaml:"targets,omitempty" validate:"required"`
}

type DropProcessor

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

func NewDropProcessor

func NewDropProcessor() *DropProcessor

func (*DropProcessor) Config

func (r *DropProcessor) Config() interface{}

func (*DropProcessor) GetName added in v1.3.0

func (r *DropProcessor) GetName() string

func (*DropProcessor) Init

func (r *DropProcessor) Init(interceptor *Interceptor)

func (*DropProcessor) Process

func (r *DropProcessor) Process(e api.Event) error

type FmtConfig added in v1.1.0

type FmtConfig struct {
	Fields map[string]string `yaml:"fields,omitempty" validate:"required"`
}

func (*FmtConfig) Validate added in v1.1.0

func (c *FmtConfig) Validate() error

type FmtProcessor added in v1.1.0

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

func NewFmtProcessor added in v1.1.0

func NewFmtProcessor() *FmtProcessor

func (*FmtProcessor) Config added in v1.1.0

func (r *FmtProcessor) Config() interface{}

func (*FmtProcessor) GetName added in v1.3.0

func (r *FmtProcessor) GetName() string

func (*FmtProcessor) Init added in v1.1.0

func (r *FmtProcessor) Init(interceptor *Interceptor)

func (*FmtProcessor) Process added in v1.1.0

func (r *FmtProcessor) Process(e api.Event) error

type Interceptor

type Interceptor struct {
	ProcessorGroup *ProcessorGroup
	MetricContext  *eventbus.NormalizeMetricEvent
	// contains filtered or unexported fields
}

Interceptor Deprecated, use transformer instead

func (*Interceptor) BelongTo

func (i *Interceptor) BelongTo() (componentTypes []string)

func (*Interceptor) Category

func (i *Interceptor) Category() api.Category

func (*Interceptor) Config

func (i *Interceptor) Config() interface{}

func (*Interceptor) IgnoreRetry

func (i *Interceptor) IgnoreRetry() bool

func (*Interceptor) Init

func (i *Interceptor) Init(context api.Context) error

func (*Interceptor) Intercept

func (i *Interceptor) Intercept(invoker source.Invoker, invocation source.Invocation) api.Result

func (*Interceptor) Order

func (i *Interceptor) Order() int

func (*Interceptor) Start

func (i *Interceptor) Start() error

func (*Interceptor) Stop

func (i *Interceptor) Stop()

func (*Interceptor) String

func (i *Interceptor) String() string

func (*Interceptor) Type

func (i *Interceptor) Type() api.Type

type JsonDecodeConfig

type JsonDecodeConfig struct {
	Target      string `yaml:"target,omitempty" default:"body"`
	IgnoreError bool   `yaml:"ignoreError"`
}

type JsonDecodeProcessor

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

func NewJsonDecodeProcessor

func NewJsonDecodeProcessor() *JsonDecodeProcessor

func (*JsonDecodeProcessor) Config

func (r *JsonDecodeProcessor) Config() interface{}

func (*JsonDecodeProcessor) GetName added in v1.3.0

func (r *JsonDecodeProcessor) GetName() string

func (*JsonDecodeProcessor) Init

func (r *JsonDecodeProcessor) Init(interceptor *Interceptor)

func (*JsonDecodeProcessor) Process

func (r *JsonDecodeProcessor) Process(e api.Event) error

type MoveConfig

type MoveConfig struct {
	Convert []Convert `yaml:"convert,omitempty"`
}

type MoveProcessor

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

func NewMoveProcessor

func NewMoveProcessor() *MoveProcessor

func (*MoveProcessor) Config

func (r *MoveProcessor) Config() interface{}

func (*MoveProcessor) GetName added in v1.3.0

func (r *MoveProcessor) GetName() string

func (*MoveProcessor) Init

func (r *MoveProcessor) Init(interceptor *Interceptor)

func (*MoveProcessor) Process

func (r *MoveProcessor) Process(e api.Event) error

type Processor

type Processor interface {
	Init(interceptor *Interceptor)
	Process(e api.Event) error
	GetName() string
}

type ProcessorConfig

type ProcessorConfig []map[string]cfg.CommonCfg

type ProcessorGroup

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

func NewProcessorGroup

func NewProcessorGroup(config ProcessorConfig) *ProcessorGroup

func (*ProcessorGroup) InitAll

func (t *ProcessorGroup) InitAll(interceptor *Interceptor)

func (*ProcessorGroup) ProcessAll

func (t *ProcessorGroup) ProcessAll(e api.Event) error

type RegexConfig

type RegexConfig struct {
	Target      string `yaml:"target,omitempty" default:"body"`
	Pattern     string `yaml:"pattern,omitempty" validate:"required"`
	UnderRoot   bool   `yaml:"underRoot,omitempty" default:"true"`
	IgnoreError bool   `yaml:"ignoreError"`
}

type RegexProcessor

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

func NewRegexProcessor

func NewRegexProcessor() *RegexProcessor

func (*RegexProcessor) Config

func (r *RegexProcessor) Config() interface{}

func (*RegexProcessor) GetName added in v1.3.0

func (r *RegexProcessor) GetName() string

func (*RegexProcessor) Init

func (r *RegexProcessor) Init(interceptor *Interceptor)

func (*RegexProcessor) Process

func (r *RegexProcessor) Process(e api.Event) error

type SplitConfig

type SplitConfig struct {
	Target      string   `yaml:"target,omitempty" default:"body"`
	Separator   string   `yaml:"separator,omitempty" validate:"required"`
	Max         int      `yaml:"max,omitempty" default:"-1"`
	Keys        []string `yaml:"keys,omitempty"`
	IgnoreError bool     `yaml:"ignoreError"`
}

type SplitProcessor

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

func NewSplitProcessor

func NewSplitProcessor() *SplitProcessor

func (*SplitProcessor) Config

func (r *SplitProcessor) Config() interface{}

func (*SplitProcessor) GetName added in v1.3.0

func (r *SplitProcessor) GetName() string

func (*SplitProcessor) Init

func (r *SplitProcessor) Init(interceptor *Interceptor)

func (*SplitProcessor) Process

func (r *SplitProcessor) Process(e api.Event) error

type TimestampConfig

type TimestampConfig struct {
	Convert []TimestampConvert `yaml:"convert,omitempty"`
}

type TimestampConvert

type TimestampConvert struct {
	From       string `yaml:"from,omitempty" validate:"required"`
	FromLayout string `yaml:"fromLayout,omitempty" validate:"required"`
	ToLayout   string `yaml:"toLayout,omitempty" validate:"required"`
	ToType     string `yaml:"toType,omitempty"`
	// contains filtered or unexported fields
}

type TimestampProcessor

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

func NewTimestampProcessor

func NewTimestampProcessor() *TimestampProcessor

func (*TimestampProcessor) Config

func (r *TimestampProcessor) Config() interface{}

func (*TimestampProcessor) GetName added in v1.3.0

func (r *TimestampProcessor) GetName() string

func (*TimestampProcessor) Init

func (r *TimestampProcessor) Init(interceptor *Interceptor)

func (*TimestampProcessor) Process

func (r *TimestampProcessor) Process(e api.Event) error

type UnderRootConfig

type UnderRootConfig struct {
	Keys []string `yaml:"keys,omitempty" validate:"required"`
}

type UnderRootProcessor

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

func NewUnderRootProcessor

func NewUnderRootProcessor() *UnderRootProcessor

func (*UnderRootProcessor) Config

func (r *UnderRootProcessor) Config() interface{}

func (*UnderRootProcessor) GetName added in v1.3.0

func (r *UnderRootProcessor) GetName() string

func (*UnderRootProcessor) Init

func (r *UnderRootProcessor) Init(interceptor *Interceptor)

func (*UnderRootProcessor) Process

func (r *UnderRootProcessor) Process(e api.Event) error

Jump to

Keyboard shortcuts

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