luavm

package
v0.0.0-...-c9d2d86 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LuaWorker

type LuaWorker struct {
	L      *lua.LState
	VMConf *vm.Config
	// contains filtered or unexported fields
}

Start start vm process

func NewLuaWorker

func NewLuaWorker(conf *vm.Config) *LuaWorker

Create Lua worker

func (*LuaWorker) CheckContractCode

func (worker *LuaWorker) CheckContractCode(code string) error

func (*LuaWorker) ExecJob

func (worker *LuaWorker) ExecJob(data interface{}) (interface{}, error)

Exec worker

func (*LuaWorker) GetContractCode

func (worker *LuaWorker) GetContractCode() (string, error)

func (*LuaWorker) InitContract

func (worker *LuaWorker) InitContract(wp *vm.WorkerProc) (interface{}, error)

func (*LuaWorker) InvokeExecute

func (worker *LuaWorker) InvokeExecute(wp *vm.WorkerProc) (interface{}, error)

func (*LuaWorker) QueryContract

func (worker *LuaWorker) QueryContract(wp *vm.WorkerProc) ([]byte, error)

func (*LuaWorker) StoreContractCode

func (worker *LuaWorker) StoreContractCode() error

func (*LuaWorker) VmInitialize

func (worker *LuaWorker) VmInitialize()

func (*LuaWorker) VmJob

func (worker *LuaWorker) VmJob(data interface{}) (interface{}, error)

VmJob handler main work

func (*LuaWorker) VmReady

func (worker *LuaWorker) VmReady() bool

func (*LuaWorker) VmTerminate

func (worker *LuaWorker) VmTerminate()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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