Versions in this module Expand all Collapse all v3 v3.3.4 Sep 30, 2024 Changes in this version + var ErrJSExecDeadline = errkit.New("js engine execution deadline exceeded").SetKind(errkit.ErrKindDeadline).Build() + var NonPoolingVMConcurrency = 20 + var PoolingJsVmConcurrency = 100 + func ExecuteProgram(p *goja.Program, args *ExecuteArgs, opts *ExecuteOptions) (result goja.Value, err error) + func Init(opts *types.Options) error + func InternalGetGeneratorRuntime() *goja.Runtime + func WrapScriptNCompile(script string, strict bool) (*goja.Program, error) + type Compiler struct + func New() *Compiler + func (c *Compiler) ExecuteWithOptions(program *goja.Program, args *ExecuteArgs, opts *ExecuteOptions) (ExecuteResult, error) + type ExecuteArgs struct + Args map[string]interface{} + TemplateCtx map[string]interface{} + func NewExecuteArgs() *ExecuteArgs + func (e *ExecuteArgs) Map() map[string]interface{} + type ExecuteOptions struct + Callback func(runtime *goja.Runtime) error + Cleanup func(runtime *goja.Runtime) + Context context.Context + Source *string + TimeoutVariants *types.Timeouts + type ExecuteResult map[string]interface + func (e ExecuteResult) GetSuccess() bool + func (e ExecuteResult) Map() map[string]interface{} + func NewExecuteResult() ExecuteResult