Documentation
¶
Index ¶
- Variables
- func Close()
- func DefaultDecider(reason interface{}) actor.Directive
- func Init(logLevel alog.Level, logger mlog.ILogger)
- func IsPIDPtrEmpty(pid *actor.PID) bool
- func IsPIDValueEmpty(pid actor.PID) bool
- func Logger() log.ILogger
- type ISuper
- type OptionFunc
- func WithDecider(decider actor.DeciderFunc) OptionFunc
- func WithLogger(logger mlog.ILogger) OptionFunc
- func WithMailBoxSize(mailBoxSize int) OptionFunc
- func WithOnActorTerminateHandler(vf VFOnActorTerminated) OptionFunc
- func WithOnReceiveMessageHandler(vf VFOnReceiveMessage) OptionFunc
- func WithOnRestartedHandler(vf VFOnRestarted) OptionFunc
- func WithOnRestartingHandler(vf VFOnRestarting) OptionFunc
- func WithOnStartedHandler(vf VFOnStarted) OptionFunc
- func WithOnStoppedHandler(vf VFOnStopped) OptionFunc
- func WithOnStoppingHandler(vf VFOnStopping) OptionFunc
- func WithOnTimeoutHandler(vf VFOnTimeout) OptionFunc
- func WithStartedWaitGroup(startedWg *sync.WaitGroup) OptionFunc
- func WithStoppedWaitGroup(stoppedWg *sync.WaitGroup) OptionFunc
- type Super
- func (s *Super) Debug(format string, args ...interface{})
- func (s *Super) Error(format string, args ...interface{})
- func (s *Super) Info(format string, args ...interface{})
- func (s Super) IsStop() bool
- func (s Super) Logger() mlog.ILogger
- func (s *Super) NewLoopTimer(interval time.Duration, cb TimerCallback) TimerID
- func (s *Super) NewLoopTimerWithTag(dur time.Duration, tag TimerID, cb TimerCallback) TimerID
- func (s *Super) NewTimer(dur time.Duration, cb TimerCallback) TimerID
- func (s *Super) NewTimerWithTag(dur time.Duration, tag TimerID, cb TimerCallback) TimerID
- func (s Super) PID() *actor.PID
- func (s Super) ParentPID() *actor.PID
- func (s *Super) Poison() error
- func (s *Super) PoisonAndWait() error
- func (s *Super) Receive(ctx actor.Context)
- func (s *Super) SetLogger(logger mlog.ILogger)
- func (s *Super) SetSign(sign string)
- func (s Super) Sign() string
- func (s *Super) Start(ctx actor.Context, name string) (err error)
- func (s *Super) StartWithPrefix(ctx actor.Context, prefix string) (err error)
- func (s *Super) Stop() error
- func (s *Super) StopAndWait() error
- func (s *Super) StopTimer(id TimerID) error
- func (s *Super) WaitForStarted()
- func (s *Super) WaitForStopped()
- func (s *Super) Warn(format string, args ...interface{})
- type Timeout
- type TimerCallback
- type TimerID
- type TimerManager
- func (m *TimerManager) NewLoopTimer(dur time.Duration, callback TimerCallback) TimerID
- func (m *TimerManager) NewLoopTimerWithTag(dur time.Duration, tag TimerID, callback TimerCallback) TimerID
- func (m *TimerManager) NewTimer(dur time.Duration, callback TimerCallback) TimerID
- func (m *TimerManager) NewTimerWithTag(dur time.Duration, tag TimerID, callback TimerCallback) TimerID
- func (m *TimerManager) Stop(id TimerID) error
- func (m *TimerManager) StopAll()
- func (m *TimerManager) Trigger(id TimerID) error
- type VFOnActorTerminated
- type VFOnReceiveMessage
- type VFOnRestarted
- type VFOnRestarting
- type VFOnStarted
- type VFOnStopped
- type VFOnStopping
- type VFOnTimeout
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyStop = errors.New("already stop")
var RootContext = actor.EmptyRootContext
Functions ¶
func DefaultDecider ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func IsPIDPtrEmpty ¶
func IsPIDValueEmpty ¶
Types ¶
type ISuper ¶
type ISuper interface {
actor.Actor
PID() *actor.PID
ParentPID() *actor.PID
Sign() string
SetSign(sign string)
Logger() mlog.ILogger
SetLogger(logger mlog.ILogger)
Start(ctx actor.Context, name string) error
StartWithPrefix(ctx actor.Context, prefix string) error
WaitForStarted()
IsStop() bool
Stop() error
WaitForStopped()
StopAndWait() error
Poison() error
PoisonAndWait() error
NewTimer(dur time.Duration, cb TimerCallback) TimerID
NewTimerWithTag(dur time.Duration, tag TimerID, cb TimerCallback) TimerID
NewLoopTimer(interval time.Duration, cb TimerCallback) TimerID
NewLoopTimerWithTag(dur time.Duration, tag TimerID, cb TimerCallback) TimerID
StopTimer(id TimerID) error
Debug(format string, args ...interface{})
Info(format string, args ...interface{})
Warn(format string, args ...interface{})
Error(format string, args ...interface{})
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func NewSuper ¶
func NewSuper(options ...OptionFunc) ISuper
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
type OptionFunc ¶
type OptionFunc func(option *option)
func WithDecider ¶
func WithDecider(decider actor.DeciderFunc) OptionFunc
func WithLogger ¶
func WithLogger(logger mlog.ILogger) OptionFunc
func WithMailBoxSize ¶
func WithMailBoxSize(mailBoxSize int) OptionFunc
func WithOnActorTerminateHandler ¶
func WithOnActorTerminateHandler(vf VFOnActorTerminated) OptionFunc
func WithOnReceiveMessageHandler ¶
func WithOnReceiveMessageHandler(vf VFOnReceiveMessage) OptionFunc
func WithOnRestartedHandler ¶
func WithOnRestartedHandler(vf VFOnRestarted) OptionFunc
func WithOnRestartingHandler ¶
func WithOnRestartingHandler(vf VFOnRestarting) OptionFunc
func WithOnStartedHandler ¶
func WithOnStartedHandler(vf VFOnStarted) OptionFunc
func WithOnStoppedHandler ¶
func WithOnStoppedHandler(vf VFOnStopped) OptionFunc
func WithOnStoppingHandler ¶
func WithOnStoppingHandler(vf VFOnStopping) OptionFunc
func WithOnTimeoutHandler ¶
func WithOnTimeoutHandler(vf VFOnTimeout) OptionFunc
func WithStartedWaitGroup ¶
func WithStartedWaitGroup(startedWg *sync.WaitGroup) OptionFunc
func WithStoppedWaitGroup ¶
func WithStoppedWaitGroup(stoppedWg *sync.WaitGroup) OptionFunc
type Super ¶
type Super struct {
// contains filtered or unexported fields
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func (*Super) NewLoopTimer ¶
func (s *Super) NewLoopTimer(interval time.Duration, cb TimerCallback) TimerID
func (*Super) NewLoopTimerWithTag ¶
func (*Super) NewTimerWithTag ¶
func (Super) PID ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func (*Super) PoisonAndWait ¶
func (*Super) Receive ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func (*Super) StartWithPrefix ¶
func (*Super) StopAndWait ¶
func (*Super) WaitForStarted ¶
func (s *Super) WaitForStarted()
func (*Super) WaitForStopped ¶
func (s *Super) WaitForStopped()
type TimerCallback ¶
type TimerManager ¶
type TimerManager struct {
// contains filtered or unexported fields
}
func NewTimerManager ¶
func NewTimerManager(pid *actor.PID) *TimerManager
func (*TimerManager) NewLoopTimer ¶
func (m *TimerManager) NewLoopTimer(dur time.Duration, callback TimerCallback) TimerID
func (*TimerManager) NewLoopTimerWithTag ¶
func (m *TimerManager) NewLoopTimerWithTag(dur time.Duration, tag TimerID, callback TimerCallback) TimerID
func (*TimerManager) NewTimer ¶
func (m *TimerManager) NewTimer(dur time.Duration, callback TimerCallback) TimerID
func (*TimerManager) NewTimerWithTag ¶
func (m *TimerManager) NewTimerWithTag(dur time.Duration, tag TimerID, callback TimerCallback) TimerID
func (*TimerManager) Stop ¶
func (m *TimerManager) Stop(id TimerID) error
func (*TimerManager) StopAll ¶
func (m *TimerManager) StopAll()
func (*TimerManager) Trigger ¶
func (m *TimerManager) Trigger(id TimerID) error
type VFOnReceiveMessage ¶
type VFOnRestarted ¶
type VFOnRestarting ¶
type VFOnStarted ¶
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////