package plugin import ( "errors" "path/filepath" "time" "agent/cmd/agent/config" ) // 插件名 const ( AgentSelfPlugin = "agent" PushStreamingPlugin = "pushStreaming" ReportDCSInfoPlugin = "reportDCSInfo" ) // 插件函数 const ( ProcessPluginMsg = "processPluginMsg" ) // 插件消息 const ( PluginOpenDebugMsg = "pluginOpenDebugMsg" PluginCloseDebugMsg = "pluginCloseDebugMsg" ) var ( PushStreamingPluginSocket = PushStreamingPlugin + ".sock" ReportDCSInfoPluginSocket = ReportDCSInfoPlugin + ".sock" defaultPluginMgrConfFile = "plugin.conf" DefaultCallTimeout = 5 * time.Second ErrDisconnected = errors.New("doberman plugin disconnected") ) type Msg struct { PlgName string PlgMsg CommMsg } type CommMsg struct { MsgType string } func setPluginSocketPath() { PushStreamingPluginSocket = filepath.Join(config.PluginDir, PushStreamingPluginSocket) ReportDCSInfoPluginSocket = filepath.Join(config.PluginDir, ReportDCSInfoPluginSocket) defaultPluginMgrConfFile = filepath.Join(config.PluginDir, defaultPluginMgrConfFile) }