Documentation
¶
Index ¶
- type Runtime
- func (r *Runtime) CompleteKeywords(line string) []string
- func (r *Runtime) Do(fn func(*otto.Otto))
- func (r *Runtime) Exec(code string) (v otto.Value, err error)
- func (r *Runtime) RegisterAPIClient(client *shttp.CrudClient)
- func (r *Runtime) RegisterAPIServer(g *graph.Graph, gremlinParser *traversal.GremlinTraversalParser, ...)
- func (r *Runtime) RunScript(path string) otto.Value
- func (r *Runtime) Start()
- func (r *Runtime) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶ added in v0.21.0
Runtime is a Skydive JavaScript runtime environment
func NewRuntime ¶ added in v0.21.0
NewRuntime returns a new JavaScript runtime environment
func (*Runtime) CompleteKeywords ¶ added in v0.21.0
CompleteKeywords returns potential continuations for the given line. Since line is evaluated, callers need to make sure that evaluating line does not have side effects.
func (*Runtime) RegisterAPIClient ¶ added in v0.21.0
func (r *Runtime) RegisterAPIClient(client *shttp.CrudClient)
RegisterAPIClient exports Go function required by the API to run inside the client JS VM
func (*Runtime) RegisterAPIServer ¶ added in v0.21.0
func (r *Runtime) RegisterAPIServer(g *graph.Graph, gremlinParser *traversal.GremlinTraversalParser, server *server.Server)
RegisterAPIServer exports Go functions required by the API to run inside the JS VM
Click to show internal directories.
Click to hide internal directories.