1 Star 2 Fork 0

李文建 / light-protoactor-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
supervision_event.go 643 Bytes
一键复制 编辑 原始数据 按行查看 历史
李文建 提交于 2017-07-18 10:01 . 调整log
package actor
import (
"gitee.com/lwj8507/light-protoactor-go/eventstream"
)
//SupervisorEvent is sent on the EventStream when a supervisor have applied a directive to a failing child actor
type SupervisorEvent struct {
Child *PID
Reason interface{}
Directive Directive
}
var (
supervisionSubscriber *eventstream.Subscription
)
func init() {
supervisionSubscriber = eventstream.Subscribe(func(evt interface{}) {
if supervisorEvent, ok := evt.(*SupervisorEvent); ok {
logger.Debug("[SUPERVISION] actor=[%v], directive=[%v], reason=[%v]", supervisorEvent.Child, supervisorEvent.Directive, supervisorEvent.Reason)
}
})
}
Go
1
https://gitee.com/lwj8507/light-protoactor-go.git
git@gitee.com:lwj8507/light-protoactor-go.git
lwj8507
light-protoactor-go
light-protoactor-go
013e33d7022f

搜索帮助