Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
Compile() (err error)
PushStruct(name string, i interface{})
PushFunction(name string, i interface{})
EvalString(str ...string) (result string, errs error)
EvalScript(script *m.Script) (result string, err error)
DoFull() (res string, err error)
Do() (string, error)
AssertFunction(f string, arg ...interface{}) (result string, err error)
Print(v ...interface{})
Get() IScript
File(path string) ([]byte, error)
ScriptId() int64
Script() *m.Script
}
type EngineWatcher ¶
type EnginesWatcher ¶
type EnginesWatcher interface {
Stop()
Spawn(f func(engine Engine))
BeforeSpawn(f func(engine Engine))
Engine() Engine
AssertFunction(f string, arg ...interface{}) (result string, err error)
PushStruct(name string, str interface{})
PopStruct(name string)
PushFunction(name string, f interface{})
PopFunction(name string)
}
type IScript ¶
type IScript interface {
Init() error
Do() (string, error)
AssertFunction(string, ...interface{}) (string, error)
Compile() error
PushStruct(string, interface{})
PushFunction(string, interface{})
EvalString(string) (string, error)
CreateProgram(name, source string) (err error)
RunProgram(name string) (result string, err error)
}
IScript ...
type ScriptService ¶
type ScriptService interface {
NewEngine(s *m.Script) (Engine, error)
NewEngineWatcher(*m.Script) (EngineWatcher, error)
NewEnginesWatcher([]*m.Script) (EnginesWatcher, error)
PushStruct(name string, s interface{})
PopStruct(name string)
PushFunctions(name string, s interface{})
PopFunction(name string)
Restart()
}
ScriptService ...
Click to show internal directories.
Click to hide internal directories.