funcs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package funcs for pipeline

Index

Constants

View Source
const (
	InvalidInt   = math.MinInt32
	DefaultInt   = int64(0xdeadbeef)
	DefaultStr   = ""
	InvalidStr   = "deadbeaf"
	InvalidFloat = math.SmallestNonzeroFloat64
	DefaultFloat = float64(0.0)
)

Variables

View Source
var FuncsCheckMap = map[string]runtime.FuncCheck{
	"grok":         GrokChecking,
	"add_key":      AddkeyChecking,
	"add_pattern":  AddPatternChecking,
	"cast":         CastChecking,
	"datetime":     DateTimeChecking,
	"default_time": DefaultTimeChecking,

	"drop_key": DropkeyChecking,
	"exit":     ExitChecking,
	"get_key":  GetkeyChecking,

	"len":       LenChecking,
	"load_json": LoadJSONChecking,

	"rename":          RenameChecking,
	"set_measurement": SetMeasurementChecking,
	"set_tag":         SetTagChecking,
	"strfmt":          StrfmtChecking,
	"trim":            TrimChecking,
	"uppercase":       UppercaseChecking,
	"use":             UseChecking,
	"url_decode":      URLDecodeChecking,

	"printf":    PrintfChecking,
	"replace":   ReplaceChecking,
	"sql_cover": SQLCoverChecking,
	"xml":       XMLChecking,
}
View Source
var FuncsMap = map[string]runtime.FuncCall{
	"grok":         Grok,
	"add_key":      AddKey,
	"add_pattern":  AddPattern,
	"cast":         Cast,
	"datetime":     DateTime,
	"default_time": DefaultTime,

	"drop_key": Dropkey,
	"exit":     Exit,
	"get_key":  Getkey,

	"len":             Len,
	"load_json":       LoadJSON,
	"rename":          Rename,
	"set_tag":         SetTag,
	"set_measurement": SetMeasurement,
	"strfmt":          Strfmt,
	"trim":            Trim,
	"uppercase":       Uppercase,
	"use":             Use,
	"url_decode":      URLDecode,

	"printf":  Printf,
	"replace": Replace,
	"xml":     XML,

	"sql_cover": SQLCover,
}

Functions

func AddKey

func AddKey(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func AddPattern

func AddPattern(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func AddPatternChecking

func AddPatternChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func AddkeyChecking

func AddkeyChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Cast

func Cast(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func CastChecking

func CastChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func DateFormatHandle

func DateFormatHandle(data interface{}, precision string, fmts string) (string, error)

func DateTime

func DateTime(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func DateTimeChecking

func DateTimeChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func DefaultTime

func DefaultTime(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func DefaultTimeChecking

func DefaultTimeChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Dropkey

func Dropkey(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func DropkeyChecking

func DropkeyChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Exit

func Exit(ctx *runtime.Task, node *ast.CallExpr) *errchain.PlError

func ExitChecking

func ExitChecking(ctx *runtime.Task, node *ast.CallExpr) *errchain.PlError

func Getkey

func Getkey(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func GetkeyChecking

func GetkeyChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Grok

func Grok(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func GrokChecking

func GrokChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func GroupHandle

func GroupHandle(value interface{}, start, end float64) bool

func GroupInHandle

func GroupInHandle(value interface{}, set []interface{}) bool

func InitLog

func InitLog(logger *zap.SugaredLogger)

func JSONParse

func JSONParse(jsonStr string) map[string]interface{}

func Len

func Len(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func LenChecking

func LenChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func LoadJSON

func LoadJSON(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func LoadJSONChecking

func LoadJSONChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Printf

func Printf(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func PrintfChecking

func PrintfChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Rename

func Rename(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func RenameChecking

func RenameChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Replace

func Replace(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func ReplaceChecking

func ReplaceChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SQLCover

func SQLCover(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SQLCoverChecking

func SQLCoverChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SetMeasurement

func SetMeasurement(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SetMeasurementChecking

func SetMeasurementChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SetTag

func SetTag(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func SetTagChecking

func SetTagChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Strfmt

func Strfmt(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func StrfmtChecking

func StrfmtChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func TimestampHandle

func TimestampHandle(value, tz string) (int64, error)

func Trim

func Trim(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func TrimChecking

func TrimChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func URLDecode

func URLDecode(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func URLDecodeChecking

func URLDecodeChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func Uppercase

func Uppercase(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func UppercaseChecking

func UppercaseChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func UrldecodeHandle

func UrldecodeHandle(path string) (string, error)

func Use

func Use(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func UseChecking

func UseChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func UserAgentHandle

func UserAgentHandle(str string) (map[string]interface{}, map[string]ast.DType)

func XML

func XML(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

func XMLChecking

func XMLChecking(ctx *runtime.Task, funcExpr *ast.CallExpr) *errchain.PlError

Types

This section is empty.

Jump to

Keyboard shortcuts

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