Documentation ¶
Overview ¶
Package runtime provide a runtime for the pipeline
Index ¶
- Constants
- Variables
- func CastToStringE(val any, dtype ast.DType) (string, error)
- func CheckScript(proc *Script, funcsCheck map[string]FuncCheck) *errchain.PlError
- func Conv2String(v any, dtype ast.DType) (string, error)
- func NewRunError(ctx *Context, err string, pos token.LnColPos) *errchain.PlError
- func PutContext(ctx *Context)
- func RefRunScript(ctx *Context, proc *Script) *errchain.PlError
- func RunArithmeticExpr(ctx *Context, expr *ast.ArithmeticExpr) (any, ast.DType, *errchain.PlError)
- func RunArithmeticExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ArithmeticExpr) *errchain.PlError
- func RunAssignmentExpr(ctx *Context, expr *ast.AssignmentExpr) (any, ast.DType, *errchain.PlError)
- func RunAssignmentExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.AssignmentExpr) *errchain.PlError
- func RunAttrExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.AttrExpr) *errchain.PlError
- func RunBreakStmt(ctx *Context, stmt *ast.BreakStmt) (any, ast.DType, *errchain.PlError)
- func RunBreakStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.BreakStmt) *errchain.PlError
- func RunCallExpr(ctx *Context, expr *ast.CallExpr) (any, ast.DType, *errchain.PlError)
- func RunCallExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.CallExpr) *errchain.PlError
- func RunConditionExpr(ctx *Context, expr *ast.ConditionalExpr) (any, ast.DType, *errchain.PlError)
- func RunConditionExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ConditionalExpr) *errchain.PlError
- func RunContinueStmt(ctx *Context, stmt *ast.ContinueStmt) (any, ast.DType, *errchain.PlError)
- func RunContinueStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.ContinueStmt) *errchain.PlError
- func RunForInStmt(ctx *Context, stmt *ast.ForInStmt) (any, ast.DType, *errchain.PlError)
- func RunForInStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.ForInStmt) *errchain.PlError
- func RunForStmt(ctx *Context, stmt *ast.ForStmt) (any, ast.DType, *errchain.PlError)
- func RunForStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.ForStmt) *errchain.PlError
- func RunIfElseStmt(ctx *Context, stmt *ast.IfelseStmt) (any, ast.DType, *errchain.PlError)
- func RunIfElseStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.IfelseStmt) *errchain.PlError
- func RunInExpr(ctx *Context, expr *ast.InExpr) (any, ast.DType, *errchain.PlError)
- func RunIndexExprGet(ctx *Context, expr *ast.IndexExpr) (any, ast.DType, *errchain.PlError)
- func RunIndexExprGetCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.IndexExpr) *errchain.PlError
- func RunListInitExpr(ctx *Context, expr *ast.ListInitExpr) (any, ast.DType, *errchain.PlError)
- func RunListInitExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ListInitExpr) *errchain.PlError
- func RunMapInitExpr(ctx *Context, expr *ast.MapInitExpr) (any, ast.DType, *errchain.PlError)
- func RunMapInitExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.MapInitExpr) *errchain.PlError
- func RunParenExpr(ctx *Context, expr *ast.ParenExpr) (any, ast.DType, *errchain.PlError)
- func RunParenExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ParenExpr) *errchain.PlError
- func RunScriptWithRMapIn(proc *Script, data InputWithRMap, signal Signal) *errchain.PlError
- func RunScriptWithoutMapIn(proc *Script, data InputWithoutMap, signal Signal) *errchain.PlError
- func RunStmt(ctx *Context, node *ast.Node) (any, ast.DType, *errchain.PlError)
- func RunStmtCheck(ctx *Context, ctxCheck *ContextCheck, node *ast.Node) *errchain.PlError
- func RunStmts(ctx *Context, nodes ast.Stmts) *errchain.PlError
- func RunStmtsCheck(ctx *Context, ctxCheck *ContextCheck, nodes ast.Stmts) *errchain.PlError
- func RunUnaryExpr(ctx *Context, expr *ast.UnaryExpr) (any, ast.DType, *errchain.PlError)
- func RunUnaryExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.UnaryExpr) *errchain.PlError
- type Context
- func GetContext() *Context
- func InitCtxForCheck(ctx *Context, funcs map[string]FuncCall, funcsCheck map[string]FuncCheck, ...) *Context
- func InitCtxWithRMap(ctx *Context, inWithRMap InputWithRMap, funcs map[string]FuncCall, ...) *Context
- func InitCtxWithoutMap(ctx *Context, inWithoutMap InputWithoutMap, funcs map[string]FuncCall, ...) *Context
- func (ctx *Context) GetFuncCall(key string) (FuncCall, bool)
- func (ctx *Context) GetFuncCheck(key string) (FuncCheck, bool)
- func (ctx *Context) GetKey(key string) (*Varb, error)
- func (ctx *Context) GetKeyConv2Str(key string) (string, error)
- func (ctx *Context) GetPattern(pattern string) (*grok.GrokPattern, bool)
- func (ctx *Context) InData() any
- func (ctx *Context) Name() string
- func (ctx *Context) ProcExit() bool
- func (ctx *Context) SetCallRef(expr *ast.CallExpr)
- func (ctx *Context) SetExit()
- func (ctx *Context) SetPattern(patternAlias string, gPattern *grok.GrokPattern)
- func (ctx *Context) SetVarb(key string, value any, dtype ast.DType) error
- func (ctx *Context) Signal() Signal
- func (ctx *Context) StackClear()
- func (ctx *Context) StackEnterNew()
- func (ctx *Context) StackExitCur()
- func (ctx *Context) StmtRetrun() bool
- type ContextCheck
- type FuncCall
- type FuncCheck
- type InType
- type InputWithRMap
- type InputWithoutMap
- type PlProcStack
- func (stack *PlProcStack) Clear()
- func (stack *PlProcStack) Get(key string) (*Varb, error)
- func (stack *PlProcStack) GetPattern(pattern string) (*grok.GrokPattern, bool)
- func (stack *PlProcStack) Set(key string, value any, dType ast.DType)
- func (stack *PlProcStack) SetPattern(patternAlias string, grokPattern *grok.GrokPattern)
- type PlReg
- type PlRegRange
- type Script
- type Signal
- type Varb
Constants ¶
View Source
const ( InNoSet = iota InWithoutMap InRMap )
View Source
const ( RegR0 = iota RegR1 RegR2 RegR3 RegR4 RegR5 )
View Source
const (
PlRunInfoField = "pl_msg"
)
Variables ¶
View Source
var DenormalizedGlobalPatterns map[string]*grok.GrokPattern = grok.CopyDenormalizedDefalutPatterns()
Functions ¶
func CheckScript ¶
func PutContext ¶
func PutContext(ctx *Context)
func RunArithmeticExpr ¶
func RunArithmeticExprCheck ¶
func RunArithmeticExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ArithmeticExpr) *errchain.PlError
func RunAssignmentExpr ¶
func RunAssignmentExprCheck ¶
func RunAssignmentExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.AssignmentExpr) *errchain.PlError
func RunAttrExprCheck ¶
func RunBreakStmt ¶
func RunBreakStmtCheck ¶
func RunCallExpr ¶
func RunCallExprCheck ¶
func RunConditionExpr ¶
func RunConditionExprCheck ¶
func RunConditionExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ConditionalExpr) *errchain.PlError
func RunContinueStmt ¶
func RunContinueStmtCheck ¶
func RunContinueStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.ContinueStmt) *errchain.PlError
func RunForInStmt ¶
func RunForInStmtCheck ¶
func RunForStmt ¶
func RunForStmtCheck ¶
func RunIfElseStmt ¶
func RunIfElseStmtCheck ¶
func RunIfElseStmtCheck(ctx *Context, ctxCheck *ContextCheck, stmt *ast.IfelseStmt) *errchain.PlError
func RunIndexExprGet ¶
func RunIndexExprGetCheck ¶
func RunListInitExpr ¶
func RunListInitExprCheck ¶
func RunListInitExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.ListInitExpr) *errchain.PlError
func RunMapInitExpr ¶
func RunMapInitExprCheck ¶
func RunMapInitExprCheck(ctx *Context, ctxCheck *ContextCheck, expr *ast.MapInitExpr) *errchain.PlError
func RunParenExpr ¶
func RunParenExprCheck ¶
func RunScriptWithRMapIn ¶
func RunScriptWithRMapIn(proc *Script, data InputWithRMap, signal Signal) *errchain.PlError
func RunScriptWithoutMapIn ¶
func RunScriptWithoutMapIn(proc *Script, data InputWithoutMap, signal Signal) *errchain.PlError
func RunStmtCheck ¶
func RunStmtsCheck ¶
func RunUnaryExpr ¶ added in v0.2.6
func RunUnaryExprCheck ¶ added in v0.2.8
Types ¶
type Context ¶
type Context struct { Regs PlReg // contains filtered or unexported fields }
func GetContext ¶
func GetContext() *Context
func InitCtxForCheck ¶
func InitCtxWithRMap ¶
func InitCtxWithoutMap ¶
func (*Context) GetPattern ¶
func (ctx *Context) GetPattern(pattern string) (*grok.GrokPattern, bool)
func (*Context) SetCallRef ¶
func (*Context) SetPattern ¶
func (ctx *Context) SetPattern(patternAlias string, gPattern *grok.GrokPattern)
func (*Context) StackClear ¶
func (ctx *Context) StackClear()
func (*Context) StackEnterNew ¶
func (ctx *Context) StackEnterNew()
func (*Context) StackExitCur ¶
func (ctx *Context) StackExitCur()
func (*Context) StmtRetrun ¶
type ContextCheck ¶
type ContextCheck struct {
// contains filtered or unexported fields
}
type InputWithoutMap ¶
type InputWithoutMap interface{}
type PlProcStack ¶
type PlProcStack struct {
// contains filtered or unexported fields
}
func (*PlProcStack) Clear ¶
func (stack *PlProcStack) Clear()
func (*PlProcStack) GetPattern ¶
func (stack *PlProcStack) GetPattern(pattern string) (*grok.GrokPattern, bool)
func (*PlProcStack) SetPattern ¶
func (stack *PlProcStack) SetPattern(patternAlias string, grokPattern *grok.GrokPattern)
type PlRegRange ¶
type PlRegRange uint
Click to show internal directories.
Click to hide internal directories.