Documentation
¶
Index ¶
- type BrokerConfig
- type InitHandler
- type MicroService
- func (serv *MicroService) ResetClient(code string)
- func (serv *MicroService) Run()
- func (serv *MicroService) SendLog(logType qdefine.ELog, content string, err error)
- func (serv *MicroService) SendNotice(route string, content any)
- func (serv *MicroService) SendRequest(module, route string, params any) (qdefine.Context, error)
- type NoticeHandler
- type ReqHandler
- type Setting
- func (s *Setting) BindInitFunc(onInitHandler InitHandler) *Setting
- func (s *Setting) BindNoticeFunc(onNoticeHandler NoticeHandler) *Setting
- func (s *Setting) BindReqFunc(onReqHandler ReqHandler) *Setting
- func (s *Setting) BindStateFunc(onStateHandler StateHandler) *Setting
- func (s *Setting) SetDeviceCode(code string) *Setting
- type StateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerConfig ¶
BrokerConfig 主服务配置
type MicroService ¶
type MicroService struct { Module string // contains filtered or unexported fields }
func (*MicroService) ResetClient ¶ added in v0.0.10
func (serv *MicroService) ResetClient(code string)
ResetClient 重置客户端
func (*MicroService) SendLog ¶
func (serv *MicroService) SendLog(logType qdefine.ELog, content string, err error)
SendLog 发送日志
func (*MicroService) SendNotice ¶
func (serv *MicroService) SendNotice(route string, content any)
SendNotice 发送通知
func (*MicroService) SendRequest ¶
SendRequest 发送请求
type ReqHandler ¶
ReqHandler 请求回调
type Setting ¶
type Setting struct { Module string // 模块服务名称 Desc string // 模块服务描述 Version string // 模块服务版本 Broker BrokerConfig // 主服务配置 // contains filtered or unexported fields }
Setting 模块配置
func NewSetting ¶
NewSetting 创建模块配置
func (*Setting) BindInitFunc ¶ added in v0.0.10
func (s *Setting) BindInitFunc(onInitHandler InitHandler) *Setting
func (*Setting) BindNoticeFunc ¶ added in v0.0.10
func (s *Setting) BindNoticeFunc(onNoticeHandler NoticeHandler) *Setting
func (*Setting) BindReqFunc ¶ added in v0.0.10
func (s *Setting) BindReqFunc(onReqHandler ReqHandler) *Setting
func (*Setting) BindStateFunc ¶ added in v0.0.10
func (s *Setting) BindStateFunc(onStateHandler StateHandler) *Setting
func (*Setting) SetDeviceCode ¶ added in v0.0.10
type StateHandler ¶ added in v0.0.10
type StateHandler func(state qdefine.ECommState)
StateHandler 状态回调
Click to show internal directories.
Click to hide internal directories.