Versions in this module Expand all Collapse all v1 v1.0.1 Aug 3, 2023 v1.0.0 Aug 3, 2023 Changes in this version + const InitModuleId + func Init() + func SetMaxServiceChannel(maxEventChannel int) + func Setup(s IService) bool + func Start() + func StopAllService() + type DiscoveryServiceEvent struct + IsDiscovery bool + NodeId int + ServiceName []string + func (rpcEventData *DiscoveryServiceEvent) GetEventType() event.EventType + type IModule interface + AddModule func(module IModule) (uint32, error) + GetAncestor func() IModule + GetEventProcessor func() event.IEventProcessor + GetModule func(moduleId uint32) IModule + GetModuleId func() uint32 + GetModuleName func() string + GetParent func() IModule + GetService func() IService + NewModuleId func() uint32 + NotifyEvent func(ev event.IEvent) + OnInit func() error + OnRelease func() + ReleaseModule func(moduleId uint32) + SetModuleId func(moduleId uint32) bool + type IModuleTimer interface + AfterFunc func(d time.Duration, cb func(*timer.Timer)) *timer.Timer + CronFunc func(cronExpr *timer.CronExpr, cb func(*timer.Cron)) *timer.Cron + NewTicker func(d time.Duration, cb func(*timer.Ticker)) *timer.Ticker + type IService interface + GetName func() string + GetProfiler func() *profiler.Profiler + GetRpcHandler func() rpc.IRpcHandler + GetServiceCfg func() interface{} + GetServiceEventChannelNum func() int + GetServiceTimerChannelNum func() int + Init func(iService IService, getClientFun rpc.FuncRpcClient, ...) + OnInit func() error + OnRelease func() + OnSetup func(iService IService) + OnStart func() + OpenProfiler func() + SetEventChannelNum func(num int) + SetName func(serviceName string) + Start func() + Stop func() + func GetService(serviceName string) IService + type Module struct + func (m *Module) AddModule(module IModule) (uint32, error) + func (m *Module) AfterFunc(d time.Duration, cb func(*timer.Timer)) *timer.Timer + func (m *Module) CancelTimerId(timerId *uint64) bool + func (m *Module) CronFunc(cronExpr *timer.CronExpr, cb func(*timer.Cron)) *timer.Cron + func (m *Module) GenTimerId() uint64 + func (m *Module) GetAncestor() IModule + func (m *Module) GetEventHandler() event.IEventHandler + func (m *Module) GetEventProcessor() event.IEventProcessor + func (m *Module) GetModule(moduleId uint32) IModule + func (m *Module) GetModuleId() uint32 + func (m *Module) GetModuleName() string + func (m *Module) GetParent() IModule + func (m *Module) GetService() IService + func (m *Module) NewModuleId() uint32 + func (m *Module) NewTicker(d time.Duration, cb func(*timer.Ticker)) *timer.Ticker + func (m *Module) NotifyEvent(ev event.IEvent) + func (m *Module) OnAddTimer(t timer.ITimer) + func (m *Module) OnCloseTimer(t timer.ITimer) + func (m *Module) OnInit() error + func (m *Module) OnRelease() + func (m *Module) ReleaseModule(moduleId uint32) + func (m *Module) SafeAfterFunc(timerId *uint64, d time.Duration, AdditionData interface{}, ...) + func (m *Module) SafeCronFunc(cronId *uint64, cronExpr *timer.CronExpr, AdditionData interface{}, ...) + func (m *Module) SafeNewTicker(tickerId *uint64, d time.Duration, AdditionData interface{}, ...) + func (m *Module) SetModuleId(moduleId uint32) bool + type RegDiscoveryServiceEventFunType func(serviceName string) + var RegDiscoveryServiceEventFun RegDiscoveryServiceEventFunType + var UnRegDiscoveryServiceEventFun RegDiscoveryServiceEventFunType + type RegRpcEventFunType func(serviceName string) + var RegRpcEventFun RegRpcEventFunType + var UnRegRpcEventFun RegRpcEventFunType + type RpcConnEvent struct + IsConnect bool + NodeId int + func (rpcEventData *RpcConnEvent) GetEventType() event.EventType + type Service struct + func (s *Service) GetName() string + func (s *Service) GetProfiler() *profiler.Profiler + func (s *Service) GetServiceCfg() interface{} + func (s *Service) GetServiceEventChannelNum() int + func (s *Service) GetServiceTimerChannelNum() int + func (s *Service) Init(iService IService, getClientFun rpc.FuncRpcClient, ...) + func (s *Service) IsSingleCoroutine() bool + func (s *Service) OnDiscoverServiceEvent(ev event.IEvent) + func (s *Service) OnInit() error + func (s *Service) OnNodeEvent(ev event.IEvent) + func (s *Service) OnRelease() + func (s *Service) OnSetup(iService IService) + func (s *Service) OnStart() + func (s *Service) OpenProfiler() + func (s *Service) PushEvent(ev event.IEvent) error + func (s *Service) PushRpcRequest(rpcRequest *rpc.RpcRequest) error + func (s *Service) PushRpcResponse(call *rpc.Call) error + func (s *Service) RegDiscoverListener(discoveryServiceListener rpc.IDiscoveryServiceListener) + func (s *Service) RegEventReceiverFunc(eventType event.EventType, receiver event.IEventHandler, ...) + func (s *Service) RegRawRpc(rpcMethodId uint32, rawRpcCB rpc.RawRpcCallBack) + func (s *Service) RegRpcListener(rpcEventLister rpc.INodeListener) + func (s *Service) Release() + func (s *Service) Run() + func (s *Service) SetEventChannelNum(num int) + func (s *Service) SetGoRoutineNum(goroutineNum int32) bool + func (s *Service) SetName(serviceName string) + func (s *Service) Start() + func (s *Service) Stop() + func (s *Service) UnRegDiscoverListener(rpcLister rpc.INodeListener) + func (s *Service) UnRegEventReceiverFunc(eventType event.EventType, receiver event.IEventHandler) + func (s *Service) UnRegRpcListener(rpcLister rpc.INodeListener)