Documentation ¶
Index ¶
- Constants
- Variables
- func RecvMessageUnique(conn net.Conn) (int, uint32, []byte, error)
- func SendMessageUnique(conn net.Conn, mtype int, serial uint32, raw []byte) error
- type ApiStat
- type BrainInfo
- type BrainInfoText
- type CommandParams
- type ExecStatus
- type ExecutionResult
- type ExecutionResults
- type ExecutionResultsText
- type FileDistribParams
- type FileParams
- type FilePullParams
- type FileSpreadParams
- type GroupInfo
- type HeartBeatRequest
- type HeartBeatResponse
- type ListQueryParam
- type LogParams
- type NameServiceEntry
- type NodeInfo
- type NodeInfoText
- type NodeJoinInfo
- type NodeJoinResponse
- type NodeParseResult
- type NodesInfo
- type NodesInfoText
- type NodesStatus
- type NodesStatusText
- type ProxyMsg
- type Response
- type Result
- type SSHInfo
- type SSHInfoDump
- type ScriptParams
- type Status
- type StatusText
- type Summary
- type WorkgroupChildren
- type WorkgroupInfo
- type WorkgroupMembers
- type WorkgroupMembersPostParams
Constants ¶
View Source
const ( TypeNodeJoin = iota TypeNodeJoinResponse TypeHeartbeat TypeHeartbeatResponse TypeFilePush TypeFilePushResponse TypeFilePull TypeFilePullResponse TypeFileTree TypeFileTreeResponse TypeNodeStatus TypeNodeStatusResponse TypeNodeLog TypeNodeLogResponse TypeRunCommand TypeRunCommandResponse TypeRunScript TypeRunScriptResponse TypeAppCreate TypeAppCreateResponse TypeAppDelete TypeAppDeleteResponse TypeAppDeploy TypeAppDeployResponse TypeAppVersion TypeAppVersionResponse TypeAppsInfo TypeAppsInfoResponse TypeAppReset TypeAppResetResponse TypeAppLatestVersion TypeAppLatestVersionResponse TypePakmaCommand TypePakmaCommandResponse TypeSshRegister TypeSshRegisterResponse TypeSshUnregister TypeSshUnregisterResponse TypeWaitTask TypeWaitTaskResponse TypeCancelTask TypeCancelTaskResponse TypeQueryTask TypeQueryTaskResponse TypeListTasks TypeListTasksResponse TypeAppCommit TypeAppCommitResponse TypeAppInfo TypeAppInfoResponse TypeUndefined )
View Source
const ( NodeStateReady = iota NodeStateDisconn NodeStateDead )
View Source
const ( ConnStateOn = iota ConnStateOff )
Variables ¶
View Source
var MsgTypeString map[int]string = map[int]string{ TypeNodeJoin: "NodeJoin", TypeNodeJoinResponse: "NodeJoinResponse", TypeHeartbeat: "Heartbeat", TypeHeartbeatResponse: "HeartbeatResponse", TypeFilePush: "FilePush", TypeFilePushResponse: "FilePushResponse", TypeFilePull: "TypeFilePull", TypeFilePullResponse: "FilePullResponse", TypeFileTree: "FileTree", TypeFileTreeResponse: "FileTreeResponse", TypeNodeStatus: "NodeStatus", TypeNodeStatusResponse: "NodeStatusResponse", TypeNodeLog: "NodeLog", TypeNodeLogResponse: "NodeLogResponse", TypeRunCommand: "RunCommand", TypeRunCommandResponse: "RunCommandResponse", TypeRunScript: "RunScript", TypeRunScriptResponse: "RunScriptResponse", TypeAppCreate: "AppCreate", TypeAppCreateResponse: "AppCreateResponse", TypeAppDelete: "AppDelete", TypeAppDeleteResponse: "AppDeleteResponse", TypeAppDeploy: "AppDeploy", TypeAppDeployResponse: "AppDeployResponse", TypeAppVersion: "AppVersion", TypeAppVersionResponse: "AppVersionResponse", TypeAppsInfo: "AppsInfo", TypeAppsInfoResponse: "AppsInfoResponse", TypeAppReset: "AppReset", TypeAppResetResponse: "AppResetResponse", TypeAppLatestVersion: "AppLatestVersion", TypeAppLatestVersionResponse: "AppLatestVersionResponse", TypePakmaCommand: "TypePakmaCommand", TypePakmaCommandResponse: "TypePakmaCommandResponse", TypeSshRegister: "TypeSshRegister", TypeSshRegisterResponse: "TypeSshRegisterResponse", TypeSshUnregister: "TypeSshUnregister", TypeSshUnregisterResponse: "TypeSshUnregisterResponse", TypeWaitTask: "TypeWaitTask", TypeWaitTaskResponse: "TypeWaitTaskResponse", TypeCancelTask: "TypeCancelTask", TypeCancelTaskResponse: "TypeCancelTaskResponse", TypeQueryTask: "TypeQueryTask", TypeQueryTaskResponse: "TypeQueryTaskResponse", TypeListTasks: "TypeListTasks", TypeListTasksResponse: "TypeListTasksResponse", TypeAppCommit: "TypeAppCommit", TypeAppCommitResponse: "TypeAppCommitResponse", TypeAppInfo: "TypeAppInfo", TypeAppInfoResponse: "TypeAppInfoResponse", }
Functions ¶
Types ¶
type BrainInfoText ¶
type CommandParams ¶
type ExecStatus ¶
type ExecStatus int
const ( ExecOK ExecStatus = iota ExecCommunicationError ExecProcessError )
type ExecutionResult ¶
type ExecutionResults ¶
type ExecutionResults []ExecutionResult
func (*ExecutionResults) ToText ¶
func (results *ExecutionResults) ToText() *ExecutionResultsText
type ExecutionResultsText ¶
type ExecutionResultsText struct { Results ExecutionResults Total int Success int CommunicationError int ProcessError int }
type FileDistribParams ¶
type FileParams ¶
type FilePullParams ¶
type FileSpreadParams ¶
type GroupInfo ¶
type GroupInfo struct { Name string `json:"name" binding:"required"` Nodes []string `json:"nodes" binding:"required"` // NoCheck can be in request NoCheck bool `json:"nocheck" binding:"omitempty"` // Size and Unhealthy will be in response Size int `json:"size" binding:"omitempty"` Unhealthy []string `json:"unhealthy" binding:"omitempty"` }
type HeartBeatRequest ¶
type HeartBeatResponse ¶
type ListQueryParam ¶
type NameServiceEntry ¶
type NodeInfo ¶
type NodeInfo struct { Name string Version string Addr string State int32 ConnState int32 Delay int64 OnlineTs int64 OfflineTs int64 ActiveTs int64 BrainTs int64 }
func (*NodeInfo) ToText ¶
func (node *NodeInfo) ToText() *NodeInfoText
type NodeInfoText ¶
type NodeInfoText struct { Name string `json:"name"` Version string `json:"version"` Addr string `json:"addr"` State string `json:"state"` Delay string `json:"delay"` OnlineTime string `json:"online_time,omitempty"` OfflineTime string `json:"offline_time,omitempty"` LastOnline string `json:"last_active,omitempty"` }
type NodeJoinInfo ¶
type NodeJoinResponse ¶
type NodeParseResult ¶
type NodesInfoText ¶
type NodesInfoText struct { BrainInfo BrainInfoText `json:"brain"` NodeInfoList []*NodeInfoText `json:"nodes"` Total int `json:"total"` Online int `json:"online"` Offline int `json:"offline"` }
type NodesStatus ¶
type NodesStatus struct {
StatusList []Status
}
func (*NodesStatus) ToText ¶
func (status *NodesStatus) ToText() *NodesStatusText
type NodesStatusText ¶
type NodesStatusText struct { NodesStatusList []*StatusText `json:"nodes"` AvrCpuLoad string `json:"average_cpuload"` AvrMemoryUsage string `json:"average_memoryusage"` AvrDiskUsage string `json:"average_diskusage"` }
type Response ¶
type Response struct { Message string `json:"msg,omitempty"` NameEntry *NameServiceEntry `json:"entry,omitempty"` NameList []string `json:"list,omitempty"` }
type SSHInfoDump ¶
type ScriptParams ¶
type Status ¶
type Status struct { Name string Platform string CpuCores int LocalTime time.Time CpuLoadShort float64 CpuLoadLong float64 MemUsed uint64 MemTotal uint64 DiskUsed uint64 DiskTotal uint64 }
func (*Status) ToText ¶
func (status *Status) ToText() *StatusText
type StatusText ¶
type StatusText struct { Name string `json:"name"` Platform string `json:"platform"` CpuCores int `json:"cpu_cores"` LocalTime string `json:"local_time"` CpuLoadShort string `json:"cpu_average1"` CpuLoadLong string `json:"cpu_average10"` MemUsage string `json:"memory_usage"` DiskUsage string `json:"disk_usage"` }
type WorkgroupChildren ¶
type WorkgroupChildren []string
type WorkgroupInfo ¶
type WorkgroupMembers ¶
type WorkgroupMembers []string
type WorkgroupMembersPostParams ¶
type WorkgroupMembersPostParams struct { Path string IsAdd bool Members WorkgroupMembers }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.