Documentation ¶
Index ¶
- Constants
- func ActionDeleteAgent(agentId string, onFail func(message string)) (goNext bool)
- func AddItemState(itemId string, itemState *ItemState)
- func AddTabbar(actionWrapper actions.ActionWrapper)
- func CheckHostConnectivity(host string, port int, timeout time.Duration) (cost time.Duration, b bool)
- func ConvertReceiversToMaps(receivers []*notices.NoticeReceiver) (result []maps.Map)
- func FindAgentRuntime(agentConfig *agents.AgentConfig) *agents.AgentConfig
- func FindNoticeLinks(notice *notices.Notice) (links []maps.Map)
- func FindSharedAgents(currentAgentId string, groupIds []string, app *agents.AppConfig) []*agents.AgentConfig
- func FormatTask(task *agents.TaskConfig, agentId string) maps.Map
- func InitAppData(actionWrapper actions.ActionWrapper, agentId string, appId string, ...) *agents.AppConfig
- func ParseHostRules(rules string, max int) (result []string)
- func PostAgentEvent(agentId string, event *AgentEvent)
- func RemoveItemState(itemId string)
- func SyncAddChart(currentAgentId string, groupIds []string, app *agents.AppConfig, itemId string, ...) error
- func SyncApp(currentAgentId string, groupIds []string, app *agents.AppConfig, ...) error
- func SyncAppEvent(currentAgentId string, groupIds []string, app *agents.AppConfig, ...) error
- func SyncRemoveChart(currentAgentId string, groupIds []string, app *agents.AppConfig, ...) error
- type AgentEvent
- type AgentQueue
- type AgentState
- type Installer
- type ItemState
- type SSHAuthType
Constants ¶
View Source
const ( SSHAuthTypePassword = "password" SSHAuthTypeKey = "key" )
Variables ¶
This section is empty.
Functions ¶
func ActionDeleteAgent ¶
func AddTabbar ¶
func AddTabbar(actionWrapper actions.ActionWrapper)
func CheckHostConnectivity ¶
func CheckHostConnectivity(host string, port int, timeout time.Duration) (cost time.Duration, b bool)
检查主机设置
func ConvertReceiversToMaps ¶
func ConvertReceiversToMaps(receivers []*notices.NoticeReceiver) (result []maps.Map)
将Receiver转换为Map
func FindAgentRuntime ¶
func FindAgentRuntime(agentConfig *agents.AgentConfig) *agents.AgentConfig
查找正在运行中的Agent,用来维护Agent的状态
func FindSharedAgents ¶
func FindSharedAgents(currentAgentId string, groupIds []string, app *agents.AppConfig) []*agents.AgentConfig
查找共享的Agent
func InitAppData ¶
func InitAppData(actionWrapper actions.ActionWrapper, agentId string, appId string, tabbar string) *agents.AppConfig
App菜单
func SyncAddChart ¶
func SyncAddChart(currentAgentId string, groupIds []string, app *agents.AppConfig, itemId string, chartId string) error
添加Chart
func SyncApp ¶
func SyncApp(currentAgentId string, groupIds []string, app *agents.AppConfig, event *AgentEvent, op func(agent *agents.AgentConfig) error) error
同步App到其他Agents op是附加操作
func SyncAppEvent ¶
func SyncAppEvent(currentAgentId string, groupIds []string, app *agents.AppConfig, event *AgentEvent) error
仅同步Event
Types ¶
type AgentEvent ¶
type AgentEvent struct { Name string `json:"name"` Data interface{} `json:"data"` }
Agent事件
type AgentQueue ¶
type AgentQueue struct {
// contains filtered or unexported fields
}
func NewAgentQueue ¶
func NewAgentQueue() *AgentQueue
type AgentState ¶
type AgentState struct { Version string // 版本号 OsName string // 操作系统 Speed float64 // 连接速度,ms IP string // IP地址 IsActive bool // 是否在线 }
Agent状态
type Installer ¶
Click to show internal directories.
Click to hide internal directories.