Documentation ¶
Index ¶
- type Manager
- type PluginInfo
- type SysPlugin
- func (pm *SysPlugin) GetProtocolPlugin(protocolName string) (obj module.Protocol, err error)
- func (pm *SysPlugin) GetProtocolUnpackData(protocolType string, data []byte) (res model.JsonRes, err error)
- func (pm *SysPlugin) NoticeSend(noticeName string, msg model.NoticeInfoData) (res string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { Type string // 管理器处理的插件类型的id Glob string // 全局的插件文件名 Path string // 插件路径 Plugins map[string]*PluginInfo // 插件信息列表 // contains filtered or unexported fields }
Manager 为不同类型的插件,管理的生命周期
func NewManager ¶
func (*Manager) GetInterface ¶
type PluginInfo ¶
type SysPlugin ¶
type SysPlugin struct {
// contains filtered or unexported fields
}
func (*SysPlugin) GetProtocolPlugin ¶ added in v1.0.5
GetProtocolPlugin 获取指协议名称的插件
func (*SysPlugin) GetProtocolUnpackData ¶
func (pm *SysPlugin) GetProtocolUnpackData(protocolType string, data []byte) (res model.JsonRes, err error)
GetProtocolUnpackData 通过协议解析插件处理后,获取解析数据。protocolType 为协议名称 todo 需要标记数据协议子类型
func (*SysPlugin) NoticeSend ¶
func (pm *SysPlugin) NoticeSend(noticeName string, msg model.NoticeInfoData) (res string, err error)
NoticeSend 通过插件发送通知信息。noticeName 为通知插件名称;msg为通知内容
Click to show internal directories.
Click to hide internal directories.