js

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSRE

type JSRE struct {
	*otto.Otto
	// contains filtered or unexported fields
}

JSRE is a Skydive JavaScript runtime environment

func NewJSRE

func NewJSRE() (*JSRE, error)

NewJSRE returns a new JavaScript runtime environment

func (*JSRE) CompleteKeywords

func (jsre *JSRE) CompleteKeywords(line string) []string

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 (*JSRE) Do

func (jsre *JSRE) Do(fn func(*otto.Otto))

Do executes the `fn` in the event loop

func (*JSRE) Exec

func (jsre *JSRE) Exec(code string) (v otto.Value, err error)

Exec executes some JavaScript code

func (*JSRE) RegisterAPIClient

func (jsre *JSRE) RegisterAPIClient(client *shttp.CrudClient)

func (*JSRE) RegisterAPIServer

func (jsre *JSRE) RegisterAPIServer(g *graph.Graph, gremlinParser *traversal.GremlinTraversalParser, server *server.Server)

RegisterAPIServer

func (*JSRE) RunScript

func (jsre *JSRE) RunScript(path string) otto.Value

RunScript executes the specified script

func (*JSRE) Start

func (jsre *JSRE) Start()

Start the runtime evaluation loop

func (*JSRE) Stop

func (jsre *JSRE) Stop()

Stop the runtime evaluation loop

Jump to

Keyboard shortcuts

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