vm

package
v0.0.0-...-e83a2f5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 25 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 {
	AsyncPoolConcurrency int
	AsyncPoolTimeout     time.Duration
	AsyncPoolBufferSize  int
	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, 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

Jump to

Keyboard shortcuts

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