lua

package
v0.0.0-...-0e0b088 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine is a lua script engine

func NewEngine

func NewEngine() *Engine

NewEngine create a new Engine

func (*Engine) Compile

func (e *Engine) Compile(filePath string) (*lua.FunctionProto, error)

Compile reads the passed lua file from disk and compiles it.

func (*Engine) Load

func (e *Engine) Load(fname string)

func (*Engine) Stop

func (e *Engine) Stop()

Stop will stop the engine

type LStatePool

type LStatePool struct {
	// contains filtered or unexported fields
}

LStatePool is a pool for lua LState object

func (*LStatePool) Get

func (pl *LStatePool) Get() *lua.LState

Get a LState object

func (*LStatePool) New

func (pl *LStatePool) New() *lua.LState

New create a new LState object

func (*LStatePool) Put

func (pl *LStatePool) Put(L *lua.LState)

Put LState return to pool

func (*LStatePool) Shutdown

func (pl *LStatePool) Shutdown()

Shutdown close all LState object

Jump to

Keyboard shortcuts

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