Documentation
¶
Index ¶
- func Options() *options
- type Actable
- type Action
- type ActionsHandler
- type Actor
- type Addresses
- type Context
- func (context *Context) Params(key string) interface{}
- func (context *Context) ParamsBool(key string) bool
- func (context *Context) ParamsDict() *helpers.Dictionary
- func (context *Context) ParamsFloat64(key string, fallback float64) float64
- func (context *Context) ParamsInt(key string, fallback int) int
- func (context *Context) ParamsStr(key string) string
- func (context *Context) PrepareRender(viewName string) *views.Renderer
- func (context *Context) Property(key string) interface{}
- func (context *Context) PropertyBool(key string) bool
- func (context *Context) PropertyFloat64(key string, fallback float64) float64
- func (context *Context) PropertyInt(key string, fallback int) int
- func (context *Context) PropertyStr(key string) string
- func (context *Context) SetProperty(key string, value interface{})
- func (context *Context) Tell(actor *Actor, eventName string, params map[string]interface{}, cascade bool)
- type Hook
- type Mailbox
- type Manager
- func (manager *Manager) GetActors() []*Actor
- func (manager *Manager) RegisterActor(actable Actable) error
- func (manager *Manager) RegisterActorWithOptions(actable Actable) error
- func (manager *Manager) RegisterChildActor(parent Actable, actable Actable) error
- func (manager *Manager) Request(actorIdentifier string, eventName string, params map[string]interface{}) error
- func (manager *Manager) Setup(viewsManager *views.Manager)
- func (manager *Manager) Tell(actorIdentifier string, eventName string, params map[string]interface{})
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Actable ¶
type Actable interface { GetActorIdentifier() string RegisterActorActions(*ActionsHandler) }
Actable is the interface for all models implementing actor model
type ActionsHandler ¶
type ActionsHandler struct {
// contains filtered or unexported fields
}
ActionsHandler used to mange callbacks for controllers
func (*ActionsHandler) RegisterAction ¶
func (handler *ActionsHandler) RegisterAction(actionName string, action Action)
RegisterAction used to register action
func (*ActionsHandler) RegisterAfterActionHook ¶ added in v1.0.8
func (handler *ActionsHandler) RegisterAfterActionHook(afterActionHook Hook)
RegisterAfterActionHook used to add after hook
func (*ActionsHandler) RegisterBeforeActionHook ¶ added in v1.0.8
func (handler *ActionsHandler) RegisterBeforeActionHook(beforeActionHook Hook)
RegisterBeforeActionHook used to add before hook
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
Actor is the base representation of actor in actor model
func (*Actor) Identifier ¶
Identifier used to identify mailbox's address of actor
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context used to represent actor execution context with data
func (*Context) ParamsBool ¶
ParamsBool used to retrieve params value in bool
func (*Context) ParamsDict ¶ added in v1.0.21
func (context *Context) ParamsDict() *helpers.Dictionary
func (*Context) ParamsFloat64 ¶
ParamsFloat64 used to retrieve params value in float64
func (*Context) PrepareRender ¶ added in v1.0.11
func (*Context) PropertyBool ¶ added in v1.0.8
PropertyBool used to retrieve params value in bool
func (*Context) PropertyFloat64 ¶ added in v1.0.8
PropertyFloat64 used to retrieve params value in float64
func (*Context) PropertyInt ¶ added in v1.0.8
PropertyInt used to retrieve params value in int
func (*Context) PropertyStr ¶ added in v1.0.8
PropertyStr used to retrieve params value in string
func (*Context) SetProperty ¶ added in v1.0.8
SetProperty used to set property that can used across the context
type Manager ¶
type Manager struct { *Mailbox // contains filtered or unexported fields }
Manager is singleton manager for actor module
func (*Manager) RegisterActor ¶
RegisterActor used for registering an actor
func (*Manager) RegisterActorWithOptions ¶ added in v1.0.16
RegisterActorWithOptions used for registering an actor with options
func (*Manager) RegisterChildActor ¶
RegisterChildActor used to creating an actor instance for model
func (*Manager) Request ¶
func (manager *Manager) Request(actorIdentifier string, eventName string, params map[string]interface{}) error
Request used to delegating a task to an actor synchronously with an response