luai

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LuaPlugin

type LuaPlugin struct {
	*base.PluginInfo
	// contains filtered or unexported fields
}

func CreateLuaPlugin

func CreateLuaPlugin(pluginDirPath string, config *config.Config, runtimeVersion string) (*LuaPlugin, error)

func (*LuaPlugin) Available

func (*LuaPlugin) CallFunction

func (l *LuaPlugin) CallFunction(funcName string, args ...lua.LValue) (*lua.LTable, error)

func (*LuaPlugin) Close

func (l *LuaPlugin) Close()

func (*LuaPlugin) EnvKeys

func (*LuaPlugin) HasFunction

func (l *LuaPlugin) HasFunction(name string) bool

func (*LuaPlugin) ParseLegacyFile

func (*LuaPlugin) PostInstall

func (l *LuaPlugin) PostInstall(ctx *base.PostInstallHookCtx) error

func (*LuaPlugin) PreInstall

func (*LuaPlugin) PreUninstall

func (l *LuaPlugin) PreUninstall(ctx *base.PreUninstallHookCtx) error

func (*LuaPlugin) PreUse

func (l *LuaPlugin) PreUse(ctx *base.PreUseHookCtx) (*base.PreUseHookResult, error)

type LuaVM

type LuaVM struct {
	Instance *lua.LState
}

func NewLuaVM

func NewLuaVM() *LuaVM

func (*LuaVM) CallFunction

func (vm *LuaVM) CallFunction(pluginObj *lua.LTable, funcName string, _args ...lua.LValue) (*lua.LTable, error)

func (*LuaVM) Close

func (vm *LuaVM) Close()

func (*LuaVM) LimitPackagePath

func (vm *LuaVM) LimitPackagePath(packagePaths ...string)

LimitPackagePath limits the package path of the Lua VM.

func (*LuaVM) Prepare

func (vm *LuaVM) Prepare(options *module.PreloadOptions) error

func (*LuaVM) ReturnedValue

func (vm *LuaVM) ReturnedValue() *lua.LTable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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