libLua

package
v0.0.0-...-5961e9c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalOptions

func GlobalOptions(opts *Options)

func LuaNumberToFloat32

func LuaNumberToFloat32(value interface{}) (float32, error)

func LuaNumberToFloat64

func LuaNumberToFloat64(value interface{}) (float64, error)

func LuaNumberToInt

func LuaNumberToInt(value interface{}) (int, error)

func LuaNumberToInt32

func LuaNumberToInt32(value interface{}) (int32, error)

func LuaNumberToInt64

func LuaNumberToInt64(value interface{}) (int64, error)

func RegisterExternMethod

func RegisterExternMethod(methodName string, method LuaExternFunc) error

Types

type Action

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

func NewAction

func NewAction() *Action

func (*Action) AddFunc

func (a *Action) AddFunc(methodName string, method LuaExternFunc) *Action

func (*Action) AddParam

func (a *Action) AddParam(params ...interface{}) *Action

func (*Action) Execute

func (a *Action) Execute(ctx context.Context) (interface{}, error)

func (*Action) WithEntrypoint

func (a *Action) WithEntrypoint(entrypoint string) *Action

func (*Action) WithScript

func (a *Action) WithScript(script string) *Action

func (*Action) WithScriptMD5

func (a *Action) WithScriptMD5(md5 string) *Action

func (*Action) WithScriptPath

func (a *Action) WithScriptPath(scriptPath string) *Action

type LuaExternFunc

type LuaExternFunc func(context.Context, ...interface{}) (interface{}, error)

type Metric

type Metric interface {
	Counter(name string, value int64, labels map[string]string)
	Gauge(name string, value int64, labels map[string]string)
}

type Options

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

func NewOptions

func NewOptions() *Options

func (*Options) SetMetric

func (opt *Options) SetMetric(handle Metric) *Options

func (*Options) SetPreloadScripeMethod

func (opt *Options) SetPreloadScripeMethod(method func() string) *Options

func (*Options) WithMaxVMSize

func (opt *Options) WithMaxVMSize(maxVmSize int) *Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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