luaEngine

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LoadLuaLibs = "load_lua_libs"

LoadLuaLibs If config.Properties sets this key, then it means to load the built-in lua third-party tool library, otherwise do not load

Variables

View Source
var Preloader = &preloader{}

Functions

func GoToLua

func GoToLua(L *lua.LState, v interface{}) lua.LValue

GoToLua converts a Go value to a lua.LValue

func LTableToMap

func LTableToMap(table *lua.LTable) map[string]interface{}

LTableToMap converts a lua.LTable to a map[string]interface{}

func LTableToStringMap

func LTableToStringMap(table *lua.LTable) map[string]string

LTableToStringMap converts a lua.LTable to a map[string]string

func LuaToGo

func LuaToGo(value lua.LValue) interface{}

LuaToGo converts a lua.LValue to an interface{}

func MapToLTable

func MapToLTable(L *lua.LState, m map[string]interface{}) *lua.LTable

MapToLTable converts a map to a lua.LTable

func StringMapToLTable

func StringMapToLTable(L *lua.LState, m map[string]string) *lua.LTable

StringMapToLTable converts a map to a lua.LTable

func ValidateLua

func ValidateLua(script string) error

ValidateLua 验证脚本是否正确

Types

type LStatePool

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

func NewFileLStatePool

func NewFileLStatePool(config types.Config, path string) *LStatePool

func NewStringLStatePool

func NewStringLStatePool(config types.Config, script string) *LStatePool

func (*LStatePool) Get

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

func (*LStatePool) New

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

func (*LStatePool) Put

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

func (*LStatePool) Shutdown

func (pl *LStatePool) Shutdown()

Jump to

Keyboard shortcuts

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