Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicServerInner ¶
func NewBasicServerInner ¶
func NewBasicServerInner(logger log.Logger) *BasicServerInner
func (*BasicServerInner) HandleBeat ¶
func (inner *BasicServerInner) HandleBeat() (bool, error)
func (*BasicServerInner) HandleMsg ¶
func (inner *BasicServerInner) HandleMsg(msg Msg) (terminate bool, err error)
func (*BasicServerInner) HandleShutdown ¶
func (inner *BasicServerInner) HandleShutdown(err error) bool
func (*BasicServerInner) Init ¶
func (inner *BasicServerInner) Init(*Actor) (bool, error)
type BasicServerOuter ¶
type BasicServerOuter struct {
// contains filtered or unexported fields
}
func NewBasicServerOuter ¶
func NewBasicServerOuter(mailbox *Mailbox) *BasicServerOuter
func (*BasicServerOuter) EnqueueFuncAsync ¶
func (outer *BasicServerOuter) EnqueueFuncAsync(fun func() (bool, error)) bool
func (*BasicServerOuter) ShutdownSync ¶
func (outer *BasicServerOuter) ShutdownSync()
type EnqueueFuncActor ¶
type EnqueueMsgActor ¶
type Mailbox ¶
type Mailbox struct { Terminated <-chan struct{} // contains filtered or unexported fields }
type Msg ¶
type Msg interface{}
type MsgExecFunc ¶
func (MsgExecFunc) Exec ¶
func (mef MsgExecFunc) Exec() (bool, error)
type MsgShutdown ¶
type MsgShutdown struct{}
func (MsgShutdown) Error ¶
func (shutdown MsgShutdown) Error() string
type MsgSync ¶
type MsgSync interface { InitMsg(actor EnqueueMsgActor) Close() bool Wait() bool }
type MsgSyncQuery ¶
type MsgSyncQuery struct { WaitChan chan struct{} TerminatedChan <-chan struct{} }
func (*MsgSyncQuery) Close ¶
func (msq *MsgSyncQuery) Close() bool
func (*MsgSyncQuery) InitMsg ¶
func (msq *MsgSyncQuery) InitMsg(actor EnqueueMsgActor)
func (*MsgSyncQuery) MustClose ¶
func (msq *MsgSyncQuery) MustClose()
func (*MsgSyncQuery) Wait ¶
func (msq *MsgSyncQuery) Wait() bool
Returns true iff Close() is called on MsgSyncQuery (i.e MsgSyncQuery.WaitChan is closed). Blocks until either MsgSyncQuery.WaitChan is closed, or MsgSyncQuery.TerminatedChan is closed.
type Server ¶
type Shutdownable ¶
type Shutdownable interface {
ShutdownSync()
}
type ShutdownableActor ¶
type ShutdownableActor interface {
ShutdownSync()
}
Click to show internal directories.
Click to hide internal directories.