transforms

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StageBeforeParser = "before_parser"
	StageAfterParser  = "after_parser"
)
View Source
const (
	KeyType = "type"
)

Variables

View Source
var Transformers = map[string]Creator{}

Functions

func Add

func Add(name string, creator Creator)

Types

type Creator

type Creator func() Transformer

type Transformer

type Transformer interface {
	Description() string
	SampleConfig() string
	Type() string
	Transform([]sender.Data) ([]sender.Data, error)
	RawTransform([]string) ([]string, error)
	Stage() string
	Stats() utils.StatsInfo
}

Transformer plugin做数据变换的接口 注意: transform的规则是,出错要把数据原样返回

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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