package plugin import ( "errors" "time" "agent/cmd/agent/config" ) // 插件名 const ( HadesPlugin = "agent" DobermanPlugin = "doberman" ) // 插件函数 const ( ProcessPluginMsg = "processPluginMsg" ) // 插件消息 const ( PluginOpenDebugMsg = "pluginOpenDebugMsg" PluginCloseDebugMsg = "pluginCloseDebugMsg" ) var ( HadesPluginSocket = config.PluginDir + "/" + HadesPlugin + ".sock" DobermanPluginSocket = config.PluginDir + "/" + DobermanPlugin + ".sock" DefaultCallTimeout = 5 * time.Second ErrDisconnected = errors.New("doberman plugin disconnected") ) type Msg struct { PlgName string PlgMsg CommMsg } type CommMsg struct { MsgType string }