代码拉取完成,页面将自动刷新
package define
import (
"time"
sadefine "gitee.com/simplexyz/simplego/actor/define"
satimer "gitee.com/simplexyz/simplego/actor/timer"
sawork "gitee.com/simplexyz/simplego/actor/work"
)
// IWorker 供Super子类调用的接口
type IWorker interface {
PID() *sadefine.PID
Start(ctx sadefine.Context, name string, startFunc func() error, wait bool) (err error)
HasStart() bool
Started() bool
Stop(stopFunc func(), wait bool) error
HasStop() bool
Post(work sawork.IPostWork) error
Dispatch(timeout time.Duration, work sawork.IDispatchWork) error
NewTimer(dur time.Duration, tag satimer.Tag, cb satimer.Callback) satimer.ID
NewLoopTimer(dur time.Duration, tag satimer.Tag, cb satimer.Callback) satimer.ID
StopTimer(id satimer.ID) error
}
// IWorkerImplement 供Worker调用的接口
type IWorkerImplement interface {
Destroy()
OnStarted(ctx sadefine.Context)
OnStopping(ctx sadefine.Context)
OnStopped(ctx sadefine.Context)
OnReceiveMessage(ctx sadefine.Context)
OnActorTerminated(who *sadefine.PID, ctx sadefine.Context)
OnRestarting(ctx sadefine.Context)
OnRestarted(ctx sadefine.Context)
BeforeTriggerTimer(id satimer.ID, tag satimer.Tag, ctx sadefine.Context) (ok bool, err error)
AfterTriggerTimer(err error, id satimer.ID, tag satimer.Tag, ctx sadefine.Context)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。