vm

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(src, name string) (*lua.FunctionProto, error)

Types

type Parameters

type Parameters struct {
	EnvVars    map[string]string
	Filesystem afero.Fs
}

type VM

type VM struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger, asyncPool *libpool.AsyncPool, global *luacontext.Global, params Parameters) *VM

func (*VM) ID

func (vm *VM) ID() int64

func (*VM) LState

func (vm *VM) LState() *lua.LState

func (*VM) Load

func (vm *VM) Load(proto *lua.FunctionProto) error

func (*VM) Reset

func (vm *VM) Reset()

func (*VM) Run

func (vm *VM) Run(id int64) error

func (*VM) Stop added in v0.1.2

func (vm *VM) Stop()

Jump to

Keyboard shortcuts

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