Documentation ¶
Index ¶
- type Engine
- func (s *Engine) AssertFunction(f string, arg ...interface{}) (result string, err error)
- func (s *Engine) Compile() (err error)
- func (s *Engine) Do() (string, error)
- func (s *Engine) DoFull() (res string, err error)
- func (s *Engine) EvalScript(script *m.Script) (result string, err error)
- func (s *Engine) EvalString(str ...string) (result string, errs error)
- func (s *Engine) File(path string) ([]byte, error)
- func (s *Engine) Get() IScript
- func (s *Engine) Print(v ...interface{})
- func (s *Engine) PushFunction(name string, i interface{})
- func (s *Engine) PushStruct(name string, i interface{})
- func (s *Engine) ScriptId() int64
- type EngineWatcher
- func (w *EngineWatcher) BeforeSpawn(f func(engine *Engine))
- func (w *EngineWatcher) Engine() *Engine
- func (w *EngineWatcher) PopFunction(name string)
- func (w *EngineWatcher) PopStruct(name string)
- func (w *EngineWatcher) PushFunction(name string, f interface{})
- func (w *EngineWatcher) PushStruct(name string, str interface{})
- func (w *EngineWatcher) Spawn(f func(engine *Engine))
- func (w *EngineWatcher) Stop()
- type EnginesWatcher
- func (w *EnginesWatcher) AssertFunction(f string, arg ...interface{}) (result string, err error)
- func (w *EnginesWatcher) BeforeSpawn(f func(engine *Engine))
- func (w *EnginesWatcher) Engine() *Engine
- func (w *EnginesWatcher) PopFunction(name string)
- func (w *EnginesWatcher) PopStruct(name string)
- func (w *EnginesWatcher) PushFunction(name string, f interface{})
- func (w *EnginesWatcher) PushStruct(name string, str interface{})
- func (w *EnginesWatcher) Spawn(f func(engine *Engine))
- func (w *EnginesWatcher) Stop()
- type IScript
- type Javascript
- func (j *Javascript) AssertFunction(f string, args ...interface{}) (result string, err error)
- func (j *Javascript) Compile() (err error)
- func (j *Javascript) CreateProgram(name, source string) (err error)
- func (j *Javascript) Do() (result string, err error)
- func (j *Javascript) EvalString(src string) (result string, err error)
- func (j *Javascript) GetCompiler() error
- func (j *Javascript) Init() (err error)
- func (j *Javascript) PushFunction(name string, s interface{})
- func (j *Javascript) PushStruct(name string, s interface{})
- func (j *Javascript) RunProgram(name string) (result string, err error)
- type Pull
- type ScriptService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
Engine ...
func (*Engine) AssertFunction ¶ added in v0.0.26
AssertFunction ...
func (*Engine) EvalScript ¶ added in v0.0.26
EvalScript ...
func (*Engine) EvalString ¶
EvalString ...
func (*Engine) PushFunction ¶
PushFunction ...
type EngineWatcher ¶ added in v0.12.0
type EngineWatcher struct {
// contains filtered or unexported fields
}
func NewEngineWatcher ¶ added in v0.15.0
func NewEngineWatcher(script *m.Script, s *scriptService, eventBus bus.Bus) *EngineWatcher
func (*EngineWatcher) BeforeSpawn ¶ added in v0.15.0
func (w *EngineWatcher) BeforeSpawn(f func(engine *Engine))
func (*EngineWatcher) Engine ¶ added in v0.12.0
func (w *EngineWatcher) Engine() *Engine
func (*EngineWatcher) PopFunction ¶ added in v0.16.1
func (w *EngineWatcher) PopFunction(name string)
func (*EngineWatcher) PopStruct ¶ added in v0.16.1
func (w *EngineWatcher) PopStruct(name string)
func (*EngineWatcher) PushFunction ¶ added in v0.16.1
func (w *EngineWatcher) PushFunction(name string, f interface{})
func (*EngineWatcher) PushStruct ¶ added in v0.16.1
func (w *EngineWatcher) PushStruct(name string, str interface{})
func (*EngineWatcher) Spawn ¶ added in v0.12.0
func (w *EngineWatcher) Spawn(f func(engine *Engine))
func (*EngineWatcher) Stop ¶ added in v0.12.0
func (w *EngineWatcher) Stop()
type EnginesWatcher ¶ added in v0.15.0
type EnginesWatcher struct {
// contains filtered or unexported fields
}
func NewEnginesWatcher ¶ added in v0.15.0
func NewEnginesWatcher(scripts []*m.Script, s *scriptService, eventBus bus.Bus) *EnginesWatcher
func (*EnginesWatcher) AssertFunction ¶ added in v0.15.0
func (w *EnginesWatcher) AssertFunction(f string, arg ...interface{}) (result string, err error)
func (*EnginesWatcher) BeforeSpawn ¶ added in v0.15.0
func (w *EnginesWatcher) BeforeSpawn(f func(engine *Engine))
func (*EnginesWatcher) Engine ¶ added in v0.15.0
func (w *EnginesWatcher) Engine() *Engine
func (*EnginesWatcher) PopFunction ¶ added in v0.16.1
func (w *EnginesWatcher) PopFunction(name string)
func (*EnginesWatcher) PopStruct ¶ added in v0.16.1
func (w *EnginesWatcher) PopStruct(name string)
func (*EnginesWatcher) PushFunction ¶ added in v0.16.1
func (w *EnginesWatcher) PushFunction(name string, f interface{})
func (*EnginesWatcher) PushStruct ¶ added in v0.16.1
func (w *EnginesWatcher) PushStruct(name string, str interface{})
func (*EnginesWatcher) Spawn ¶ added in v0.15.0
func (w *EnginesWatcher) Spawn(f func(engine *Engine))
func (*EnginesWatcher) Stop ¶ added in v0.15.0
func (w *EnginesWatcher) Stop()
type IScript ¶ added in v0.0.26
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 Javascript ¶
type Javascript struct {
// contains filtered or unexported fields
}
Javascript ...
func NewJavascript ¶ added in v0.0.26
func NewJavascript(engine *Engine) *Javascript
NewJavascript ...
func (*Javascript) AssertFunction ¶ added in v0.0.26
func (j *Javascript) AssertFunction(f string, args ...interface{}) (result string, err error)
AssertFunction ...
func (*Javascript) CreateProgram ¶ added in v0.0.26
func (j *Javascript) CreateProgram(name, source string) (err error)
CreateProgram ...
func (*Javascript) EvalString ¶
func (j *Javascript) EvalString(src string) (result string, err error)
EvalString ...
func (*Javascript) PushFunction ¶
func (j *Javascript) PushFunction(name string, s interface{})
PushFunction ...
func (*Javascript) PushStruct ¶
func (j *Javascript) PushStruct(name string, s interface{})
PushStruct ...
func (*Javascript) RunProgram ¶ added in v0.0.26
func (j *Javascript) RunProgram(name string) (result string, err error)
RunProgram ...
type Pull ¶
type Pull struct {
// contains filtered or unexported fields
}
Pull ...
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 ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.