Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LUAMDA_HTTP_VERBS = [7]string{ http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, }
Functions ¶
This section is empty.
Types ¶
type LuamdaEndpoints ¶ added in v0.1.6
type LuamdaReader ¶ added in v0.1.6
type LuamdaReader struct {
Endpoints *LuamdaEndpoints
}
func (*LuamdaReader) ReadFile ¶ added in v0.1.6
func (l *LuamdaReader) ReadFile(filename string) error
func (*LuamdaReader) ReadString ¶ added in v0.1.6
func (l *LuamdaReader) ReadString(str string) error
type ScriptExecutor ¶
type ScriptExecutor struct {
// contains filtered or unexported fields
}
ScriptExecutor defines the structure responsible for managing Lua script execution
func NewScriptExecutor ¶
func NewScriptExecutor(store msgstore.ScriptStore, plugins []msgplugins.PreloadFunc, nc *nats.Conn) *ScriptExecutor
NewScriptExecutor creates a new ScriptExecutor using the provided ScriptStore
func (*ScriptExecutor) HandleMessage ¶
func (se *ScriptExecutor) HandleMessage(ctx context.Context, subject string, payload []byte, replyFunc func(string))
HandleMessage receives a message, matches it to a Lua script, and executes the script in a new goroutine
func (*ScriptExecutor) Stop ¶
func (se *ScriptExecutor) Stop()
Stop gracefully shuts down the ScriptExecutor and stops watching for messages
type ScriptReader ¶
type ScriptReader struct {
Script *Script
}
func (*ScriptReader) ReadFile ¶
func (s *ScriptReader) ReadFile(filename string) error
func (*ScriptReader) ReadString ¶ added in v0.1.5
func (s *ScriptReader) ReadString(str string) error
Click to show internal directories.
Click to hide internal directories.