Documentation
¶
Overview ¶
Package executor provides an interface for executing compiled API programs.
Index ¶
- func RegisterCExtern(name string, e unsafe.Pointer)
- func RegisterGoExtern(name string, e Extern)
- type Encodable
- type Env
- func (e *Env) Any(p unsafe.Pointer) interface{}
- func (e *Env) CContext() unsafe.Pointer
- func (e *Env) Context() context.Context
- func (e *Env) Dispose()
- func (e *Env) Execute(ctx context.Context, cmd api.Cmd, id api.CmdID) error
- func (e *Env) GetBytes(rng memory.Range) []byte
- func (e *Env) Globals() []byte
- func (e *Env) Message(p unsafe.Pointer) *stringtable.Msg
- type Executor
- type Extern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCExtern ¶
RegisterCExtern registers the c extern e.
func RegisterGoExtern ¶
RegisterGoExtern registers the golang extern e.
Types ¶
type Env ¶
type Env struct { // Arena is the memory arena used by this execution environment. Arena arena.Arena // Executor is the parent executor. Executor *Executor // contains filtered or unexported fields }
Env is the go execution environment.
func (*Env) Dispose ¶
func (e *Env) Dispose()
Dispose releases the memory used by the environment. Call after the env is no longer needed to avoid leaking memory.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is used to create execution environments for a compiled program. Use New() to create Executors, do not create directly.
func (*Executor) FunctionAddress ¶
FunctionAddress returns the function address of the function with the given name or nil if the function was not found.
Click to show internal directories.
Click to hide internal directories.