Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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, 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.