Documentation
¶
Index ¶
- Constants
- func ComputeUserAgent(runtimeVersion, pluginName, pluginVersion string) string
- type LuaVM
- func (vm *LuaVM) CallFunction(pluginObj *lua.LTable, funcName string, _args ...lua.LValue) (*lua.LTable, error)
- func (vm *LuaVM) Close()
- func (vm *LuaVM) LimitPackagePath(packagePaths ...string)
- func (vm *LuaVM) Prepare(options *module.PreloadOptions) error
- func (vm *LuaVM) ReturnedValue() *lua.LTable
Constants ¶
View Source
const ( PluginObjKey = "PLUGIN" OsType = "OS_TYPE" ArchType = "ARCH_TYPE" Runtime = "RUNTIME" )
Variables ¶
This section is empty.
Functions ¶
func ComputeUserAgent ¶ added in v1.0.0
ComputeUserAgent constructs a user agent string for the vfox runtime and plugin.
Parameters:
- runtimeVersion: the version of the vfox runtime (may be empty).
- pluginName: the name of the plugin (will be prefixed with "vfox-" if not already).
- pluginVersion: the version of the plugin (may be empty).
Returns:
A user agent string in the format "vfox/<runtimeVersion> vfox-<pluginName>/<pluginVersion>", omitting version information if not provided, and trimming extra spaces.
Types ¶
type LuaVM ¶
func (*LuaVM) CallFunction ¶
func (*LuaVM) LimitPackagePath ¶
LimitPackagePath limits the package path of the Lua VM.
func (*LuaVM) ReturnedValue ¶
Click to show internal directories.
Click to hide internal directories.