Documentation ¶
Index ¶
- type Module
- func (m *Module) GetModuleInfo() server.ModuleInfo
- func (m *Module) Init()
- func (m *Module) PostInit()
- func (m *Module) PushMessage(superMessage *TemplateMessage)
- func (m *Module) Serve(s *server.Server)
- func (m *Module) Start(s *server.Server)
- func (m *Module) Stop(s *server.Server, wg *sync.WaitGroup)
- type TemplateMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct { MessageQueue chan *TemplateMessage MessageSenderWaitGroup sync.WaitGroup // contains filtered or unexported fields }
func (*Module) GetModuleInfo ¶
func (m *Module) GetModuleInfo() server.ModuleInfo
func (*Module) PushMessage ¶
func (m *Module) PushMessage(superMessage *TemplateMessage)
PushMessage 向消息队列中塞待发送消息
type TemplateMessage ¶
type TemplateMessage struct { Message *message.TemplateMessage Resend bool // 发送失败后是否重新发送 RetriedTime int64 // 记录发送失败的重试次数 MaxRetryTime int64 // 此消息的最大重试次数 -1为一直重试 }
Click to show internal directories.
Click to hide internal directories.