Documentation ¶
Overview ¶
This compiler was inspired from grafana k6 project A big kudos goes to goja library Do check it out: https://github.com/dop251/goja
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExceptionInPluginCode = errors.New("plugin code error")
Functions ¶
func NewRuntime ¶
Types ¶
type Compiler ¶
type Compiler struct { ModuleLoader *modules.ModuleLoader // contains filtered or unexported fields }
type KeyValuePairs ¶
type RunConfig ¶
type RunConfig struct { ApiSchema map[string]interface{} `json:"schema"` Type string `json:"type"` SetScore func(category string, score float32) `json:"setScore"` Report func(body *reportmanager.ReportDef) `json:"report"` }
these are the data that will be given to js code execution env
Click to show internal directories.
Click to hide internal directories.