Documentation ¶
Index ¶
- Variables
- func Close()
- func Start()
- type Agent
- type AgentID
- type ArgsVar
- func (s *ArgsVar) Length() int
- func (s *ArgsVar) Read(i int) interface{}
- func (s *ArgsVar) ReadBool(i int) bool
- func (s *ArgsVar) ReadDouble(i int) float64
- func (s *ArgsVar) ReadInt(i int) int
- func (s *ArgsVar) ReadInt32(i int) int32
- func (s *ArgsVar) ReadInt64(i int) int64
- func (s *ArgsVar) ReadString(i int) string
- func (s *ArgsVar) ReadUInt64(i int) uint64
- type AwaitRpcEventMsg
- type Component
- type ComponentEventMsg
- type ComponentID
- type ComponentMgr
- type Context
- type CustomActionEventMsg
- type DataEventMsg
- type EventMsg
- type EventQueue
- type EventType
- type Module
- type ModuleContext
- func (c *ModuleContext) Done(args ...interface{})
- func (c *ModuleContext) Get(k int) interface{}
- func (c *ModuleContext) GetAttach() interface{}
- func (c *ModuleContext) GetComponent() Component
- func (c *ModuleContext) GetModule() Module
- func (c *ModuleContext) GetSender() Agent
- func (c *ModuleContext) Reset()
- func (c *ModuleContext) Store(k int, v interface{})
- type ModuleRouter
- type ModuleWoker
- type ModuleWorkerPool
- func (this *ModuleWorkerPool) Balancer() Module
- func (this *ModuleWorkerPool) Close()
- func (this *ModuleWorkerPool) Const(n string) Module
- func (this *ModuleWorkerPool) ForEachModule(f func(m Module))
- func (this *ModuleWorkerPool) RegisterHandler(type_id ProtoTypeID, f MsgHandler)
- func (this *ModuleWorkerPool) RegisterRpcHandler(name string, f RpcHandler)
- func (this *ModuleWorkerPool) RpcCall(name string, args ...interface{})
- func (this *ModuleWorkerPool) Slot(n int) Module
- func (this *ModuleWorkerPool) Start()
- type MsgHandler
- type ProtoTypeID
- type RpcEventMsg
- type RpcHandler
- type SessionEventMsg
- type SessionMgr
- type TimerHandler
- type TimerManager
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MODULE_TIMER_INTERVAL = 1 MODULE_EVENT_LENGTH = 128 )
View Source
var PerfomancePrint bool = false
Functions ¶
Types ¶
type ArgsVar ¶
type ArgsVar struct {
// contains filtered or unexported fields
}
func (*ArgsVar) ReadDouble ¶
func (*ArgsVar) ReadString ¶
func (*ArgsVar) ReadUInt64 ¶
type AwaitRpcEventMsg ¶
type AwaitRpcEventMsg = event.AwaitRpcEventMsg
type ComponentEventMsg ¶
type ComponentEventMsg = event.ComponentEventMsg
type ComponentID ¶
type ComponentID = component.ComponentID
type ComponentMgr ¶
type ComponentMgr interface { OnComponentCreate(Context, ComponentID) OnComponentError(Context, error) }
type CustomActionEventMsg ¶
type CustomActionEventMsg = event.CustomActionEventMsg
type DataEventMsg ¶
type DataEventMsg = event.DataEventMsg
type EventQueue ¶
type EventQueue = event.EventQueue
type Module ¶
func FindModule ¶
type ModuleContext ¶
type ModuleContext struct {
// contains filtered or unexported fields
}
func (*ModuleContext) Done ¶
func (c *ModuleContext) Done(args ...interface{})
func (*ModuleContext) Get ¶
func (c *ModuleContext) Get(k int) interface{}
func (*ModuleContext) GetAttach ¶
func (c *ModuleContext) GetAttach() interface{}
func (*ModuleContext) GetComponent ¶
func (c *ModuleContext) GetComponent() Component
func (*ModuleContext) GetModule ¶
func (c *ModuleContext) GetModule() Module
func (*ModuleContext) GetSender ¶
func (c *ModuleContext) GetSender() Agent
func (*ModuleContext) Reset ¶
func (c *ModuleContext) Reset()
func (*ModuleContext) Store ¶
func (c *ModuleContext) Store(k int, v interface{})
type ModuleRouter ¶
type ModuleRouter interface { RouterMsg(Agent, ProtoTypeID, interface{}) RouterRpc(Agent, string, []interface{}) RegisterHandler(ProtoTypeID, MsgHandler) RegisterRpcHandler(string, RpcHandler) }
type ModuleWoker ¶
type ModuleWorkerPool ¶
type ModuleWorkerPool struct {
// contains filtered or unexported fields
}
func (*ModuleWorkerPool) Balancer ¶
func (this *ModuleWorkerPool) Balancer() Module
func (*ModuleWorkerPool) Close ¶
func (this *ModuleWorkerPool) Close()
func (*ModuleWorkerPool) Const ¶
func (this *ModuleWorkerPool) Const(n string) Module
func (*ModuleWorkerPool) ForEachModule ¶
func (this *ModuleWorkerPool) ForEachModule(f func(m Module))
func (*ModuleWorkerPool) RegisterHandler ¶
func (this *ModuleWorkerPool) RegisterHandler(type_id ProtoTypeID, f MsgHandler)
func (*ModuleWorkerPool) RegisterRpcHandler ¶
func (this *ModuleWorkerPool) RegisterRpcHandler(name string, f RpcHandler)
func (*ModuleWorkerPool) RpcCall ¶
func (this *ModuleWorkerPool) RpcCall(name string, args ...interface{})
func (*ModuleWorkerPool) Slot ¶
func (this *ModuleWorkerPool) Slot(n int) Module
func (*ModuleWorkerPool) Start ¶
func (this *ModuleWorkerPool) Start()
type MsgHandler ¶
type MsgHandler func(Context, interface{})
type ProtoTypeID ¶
type ProtoTypeID = uint32
type RpcEventMsg ¶
type RpcEventMsg = event.RpcEventMsg
type RpcHandler ¶
type SessionEventMsg ¶
type SessionEventMsg = event.SessionEventMsg
type SessionMgr ¶
type SessionMgr = network.SessionMgr
type TimerHandler ¶
type TimerHandler = timer.TimerHandler
type TimerManager ¶
type TimerManager = timer.TimerManager
type WorkerPool ¶
type WorkerPool interface { ForEachModule(func(m Module)) RegisterRpcHandler(string, RpcHandler) RegisterHandler(ProtoTypeID, MsgHandler) RpcCall(string, ...interface{}) Balancer() Module Const(string) Module Slot(int) Module }
func CreateWorkers ¶
func CreateWorkers(name string, size int) WorkerPool
func GetWorkerPool ¶
func GetWorkerPool(name string) WorkerPool
Click to show internal directories.
Click to hide internal directories.