Start work on lua based plugin system
Some checks failed
/ docker (push) Has been cancelled

This commit is contained in:
Melody Becker 2025-06-02 17:40:53 +02:00
parent bf0aaaca8f
commit 94106bb82f
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
8 changed files with 430 additions and 1 deletions

23
plugins/runner.go Normal file
View file

@ -0,0 +1,23 @@
package plugins
import lua "github.com/yuin/gopher-lua"
type Runner struct {
state *lua.LState
inUse bool
}
func NewRunner() (*Runner, error) {
lState, err := NewBlankState()
if err != nil {
return nil, err
}
return &Runner{
lState,
false,
}, nil
}
func (r *Runner) IsInUse() bool {
return r.inUse
}