Documentation
¶
Overview ¶
Package behavior provides dynamic lookup of functions for handling events like receiving messages and for setting up and running stuff like actors.
Index ¶
- Variables
- func LoadRegistry(uname string, specs HSpecs)
- type ActionHandler
- type Context
- func (ctx Context) Deadline() (deadline time.Time, ok bool)
- func (ctx Context) Done() <-chan struct{}
- func (ctx Context) Err() error
- func (ctx *Context) GetHandler(name string) Handler
- func (ctx *Context) GetStep() Step
- func (ctx *Context) HandleAction(spec m.Map, msg Message) bool
- func (ctx *Context) HandleDone() bool
- func (ctx *Context) HandleMsg(msg Message) bool
- func (ctx *Context) HandleSpec(spec m.Map) bool
- func (ctx *Context) Log(lvl l.Level, txt string, fields m.Map)
- func (ctx *Context) LogCatch(txt string, err interface{})
- func (ctx *Context) LogDebug(txt string, fields m.Map)
- func (ctx *Context) LogErr(txt string, fields m.Map)
- func (ctx *Context) LogInfo(txt string, fields m.Map)
- func (ctx *Context) LogTrace(txt string, fields m.Map)
- func (ctx *Context) LogWarn(txt string, fields m.Map)
- func (ctx *Context) Msg(par ...string) msgCtx
- func (ctx *Context) Run(fct func())
- func (ctx *Context) RunListener()
- func (ctx *Context) RunMsg(fct MsgProc, msg Message)
- func (ctx *Context) RunProc(fct Proc)
- func (ctx *Context) Send(msg *Message, svcName string)
- func (ctx *Context) Startup()
- func (ctx Context) Value(key interface{}) interface{}
- type DummyHandler
- type HSpecs
- type Handler
- type Logger
- type Message
- type MsgCtx
- type MsgHandler
- type MsgProc
- type Payload
- type Proc
- type Registry
- type SpecHandler
- type Step
Constants ¶
This section is empty.
Variables ¶
View Source
var Quit = Message{Action: "quit"}
Functions ¶
func LoadRegistry ¶
Types ¶
type Context ¶
type Context struct { Name string Home string Config m.Map State interface{} Logger Logger Parent *Context Self chan Message DoneCh chan struct{} WaitGroup *sync.WaitGroup Children map[string]*Context Services map[string]*Context }
func (*Context) GetHandler ¶
func (*Context) HandleDone ¶
func (*Context) RunListener ¶
func (ctx *Context) RunListener()
type DummyHandler ¶
type Message ¶
type MsgHandler ¶
Click to show internal directories.
Click to hide internal directories.