lua

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCallStackSize = 128
	DefaultRegistrySize  = 256
	DefaultScriptTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	L *lua.LState

	LastCommand   *cli.Command
	ScriptTimeout time.Duration
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(registrar cli.PluginRegistrar, opts ...EngineOption) *Engine

func (*Engine) Close

func (e *Engine) Close()

func (*Engine) DoString added in v1.0.6

func (e *Engine) DoString(script string) error

func (*Engine) LoadDir

func (e *Engine) LoadDir(dir string) error

func (*Engine) LoadFile

func (e *Engine) LoadFile(path string) error

type EngineOption added in v1.0.6

type EngineOption func(*Engine)

func WithScriptTimeout added in v1.0.6

func WithScriptTimeout(d time.Duration) EngineOption

Jump to

Keyboard shortcuts

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