Documentation ¶
Index ¶
- Constants
- func LDebug(l *lua.LState) int
- func LError(l *lua.LState) int
- func LGoVersion(l *lua.LState) int
- func LWarn(l *lua.LState) int
- func New(id Id, handler spawnActor, opt ...Option) *actor
- type Actor
- type Base
- type EvClusterUpdate
- type EvDelActor
- type EvNewActor
- type EvSessionClosed
- type EvSessionOpened
- type Handler
- type Id
- type Message
- type Option
- type ReqMsgDrain
- type RequestId
- type RespMsgDrain
- type Sender
- type System
- func (s *System) Add(actor *actor) error
- func (s *System) Address() string
- func (ed *System) CancelAll(actorId Id)
- func (ed *System) CancelEvent(actorId Id, events ...interface{})
- func (s *System) Cluster() *actor
- func (ed *System) DispatchEvent(sourceId Id, event interface{})
- func (s *System) LocalActor(actorId string) *actor
- func (ed *System) OnEvent(actorId Id, callback Handler)
- func (s *System) ProtoIndex() *tools.ProtoIndex
- func (s *System) RequestWait(targetId string, msg interface{}, timeout ...time.Duration) (resp interface{}, err error)
- func (s *System) Send(sourceId, targetId Id, requestId RequestId, msg interface{}) (err error)
- func (s *System) SetCluster(act *actor)
- func (s *System) Stop()
- func (s *System) WaiterId() string
- type SystemOption
- type Timer
- type TmpActor
Constants ¶
View Source
const (
DefaultSysAddr = ":8888"
)
View Source
const DefaultTimeout = time.Second * 10
Variables ¶
This section is empty.
Functions ¶
func LGoVersion ¶
Types ¶
type EvClusterUpdate ¶ added in v1.0.7
type EvDelActor ¶ added in v1.2.16
type EvNewActor ¶ added in v1.2.16
type EvSessionClosed ¶ added in v1.2.16
type EvSessionClosed struct {
PeerHost string
}
type EvSessionOpened ¶ added in v1.2.16
type EvSessionOpened struct {
PeerHost string
}
type Option ¶ added in v1.1.10
type Option func(*actor)
func SetLocalized ¶
func SetLocalized() Option
func SetMailBoxSize ¶
type ReqMsgDrain ¶ added in v1.2.21
type ReqMsgDrain struct{}
type RespMsgDrain ¶ added in v1.2.21
type RespMsgDrain struct{ Err error }
type System ¶
type System struct { Stopped chan struct{} // contains filtered or unexported fields }
func NewSystem ¶
func NewSystem(op ...SystemOption) (*System, error)
func (*System) CancelEvent ¶
func (ed *System) CancelEvent(actorId Id, events ...interface{})
func (*System) DispatchEvent ¶
func (ed *System) DispatchEvent(sourceId Id, event interface{})
func (*System) LocalActor ¶ added in v1.2.19
func (*System) ProtoIndex ¶ added in v1.2.2
func (s *System) ProtoIndex() *tools.ProtoIndex
func (*System) RequestWait ¶ added in v1.2.18
func (s *System) RequestWait(targetId string, msg interface{}, timeout ...time.Duration) (resp interface{}, err error)
RequestWait sync request
func (*System) SetCluster ¶
func (s *System) SetCluster(act *actor)
type SystemOption ¶
func Addr ¶
func Addr(addr string) SystemOption
func ProtoIndex ¶ added in v1.2.0
func ProtoIndex(pi *tools.ProtoIndex) SystemOption
ProtoIndex index proto struct
Source Files ¶
Click to show internal directories.
Click to hide internal directories.