Documentation
¶
Index ¶
- Constants
- func ActionDeleteAgent(agentId string, onFail func(message string)) (goNext bool)
- func AddTabbar(actionWrapper actions.ActionWrapper)
- func CheckHostConnectivity(host string, port int, timeout time.Duration) (cost time.Duration, b bool)
- 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 *Event)
- func RemoveAgentQueue(agentId string, c chan *Event)
- func SyncAddChart(currentAgentId string, groupIds []string, app *agents.AppConfig, itemId string, ...) error
- func SyncApp(currentAgentId string, groupIds []string, app *agents.AppConfig, event *Event, ...) error
- func SyncAppEvent(currentAgentId string, groupIds []string, app *agents.AppConfig, event *Event) error
- func SyncRemoveChart(currentAgentId string, groupIds []string, app *agents.AppConfig, ...) error
- func WaitAgentQueue(agentId string, agentVersion string, osName string, speed float64, ip string, ...)
- type Event
- type Installer
- type ProcessLog
- type SSHAuthType
- type State
Constants ¶
View Source
const ( SSHAuthTypePassword = "password" SSHAuthTypeKey = "key" )
Variables ¶
This section is empty.
Functions ¶
func ActionDeleteAgent ¶ added in v0.1.6
func AddTabbar ¶
func AddTabbar(actionWrapper actions.ActionWrapper)
func CheckHostConnectivity ¶ added in v0.1.2
func CheckHostConnectivity(host string, port int, timeout time.Duration) (cost time.Duration, b bool)
检查主机设置
func FindAgentRuntime ¶
func FindAgentRuntime(agentConfig *agents.AgentConfig) *agents.AgentConfig
查找正在运行中的Agent,用来维护Agent的状态
func FindSharedAgents ¶ added in v0.1.2
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 ParseHostRules ¶ added in v0.1.2
分析主机规则
func SyncAddChart ¶ added in v0.1.2
func SyncAddChart(currentAgentId string, groupIds []string, app *agents.AppConfig, itemId string, chartId string) error
添加Chart
func SyncApp ¶ added in v0.1.2
func SyncApp(currentAgentId string, groupIds []string, app *agents.AppConfig, event *Event, op func(agent *agents.AgentConfig) error) error
同步App到其他Agents op是附加操作
func SyncAppEvent ¶ added in v0.1.2
func SyncAppEvent(currentAgentId string, groupIds []string, app *agents.AppConfig, event *Event) error
仅同步Event
Types ¶
type Installer ¶ added in v0.1.2
type ProcessLog ¶
type ProcessLog struct {
Id primitive.ObjectID `var:"id" bson:"_id" json:"id"` // 数据库存储的ID
AgentId string `bson:"agentId" json:"agentId"`
TaskId string `bson:"taskId" json:"taskId"`
ProcessId string `bson:"processId" json:"processId"`
ProcessPid int `bson:"processPid" json:"processPid"`
EventType string `bson:"eventType" json:"eventType"` // start, log, stop
Data string `bson:"data" json:"data"`
Timestamp int64 `bson:"timestamp" json:"timestamp"` // unix时间戳,单位为秒
TimeFormat struct {
Year string `bson:"year" json:"year"`
Month string `bson:"month" json:"month"`
Day string `bson:"day" json:"day"`
Hour string `bson:"hour" json:"hour"`
Minute string `bson:"minute" json:"minute"`
Second string `bson:"second" json:"second"`
} `bson:"timeFormat" json:"timeFormat"`
}
进程日志
Click to show internal directories.
Click to hide internal directories.