luahost

package
v3.1.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

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

Host of Lua extensions.

func New

func New(conf config.Lua, extHost *extension.Host) (*Host, error)

New constructs a new Lua Host, pre-compiling the source.

func NewFromReader

func NewFromReader(logger zerolog.Logger, extHost *extension.Host, r io.Reader, path string) (*Host, error)

NewFromReader constructs a new Lua Host, loading Lua source from the provided reader. The provided path is used in logging and error messages.

func (*Host) CreateChannel

func (h *Host) CreateChannel(name string) chan lua.LValue

CreateChannel creates a channel and places it into the named global variable in newly created LStates.

type Inbucket

type Inbucket struct {
	After  InbucketAfterFuncs
	Before InbucketBeforeFuncs
}

Inbucket is the primary Lua interface data structure.

type InbucketAfterFuncs

type InbucketAfterFuncs struct {
	MessageDeleted *lua.LFunction
	MessageStored  *lua.LFunction
}

InbucketAfterFuncs holds references to Lua extension functions to be called async after Inbucket handles an event.

type InbucketBeforeFuncs

type InbucketBeforeFuncs struct {
	MailAccepted  *lua.LFunction
	MessageStored *lua.LFunction
}

InbucketBeforeFuncs holds references to Lua extension functions to be called before Inbucket handles an event.

Jump to

Keyboard shortcuts

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