Documentation ¶
Overview ¶
DO NOT EDIT: auto-generated using _scripts/gen-starlark-bindings.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context interface { Client() *rpc2.RPCClient RegisterCallback(name, helpMsg string, cmdfn func(args string) (starlark.Value, error)) CallCommand(cmdstr string) error Scope() api.EvalScope LoadConfig() api.LoadConfig }
Context is the context in which starlark scripts are evaluated. It contains methods to call API functions, command line commands, etc.
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env is the environment used to evaluate starlark scripts.
func (*Env) Cancel ¶
func (env *Env) Cancel()
Cancel cancels the execution of a currently running script or function.
func (*Env) Execute ¶
func (env *Env) Execute(out io.Writer, path string, source interface{}, mainFnName string, args []interface{}, v *api.Variable) (starlark.Value, error)
Execute executes a script. Path is the name of the file to execute and source is the source code to execute. Source can be either a []byte, a string or a io.Reader. If source is nil Execute will execute the file specified by 'path'. After the file is executed if a function named mainFnName exists it will be called, passing args to it.