luasb

package
v0.0.0-...-df24528 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(l *lua.LState)

func WithFunction

func WithFunction(name string, fn lua.LGFunction) Option

type Sandbox

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

func NewSandbox

func NewSandbox(options ...Option) *Sandbox

func (*Sandbox) Do

func (s *Sandbox) Do(fn func(l *lua.LState) lua.LValue) lua.LValue

func (*Sandbox) Run

func (s *Sandbox) Run(ctx context.Context, script string) ([]lua.LValue, error)

func (*Sandbox) RunFunc

func (s *Sandbox) RunFunc(ctx context.Context, fn *lua.LFunction, args ...lua.LValue) ([]lua.LValue, error)

Jump to

Keyboard shortcuts

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