Documentation
¶
Overview ¶
Created By ytzhang0828@qq.com Use of this source code is governed by a Apache-2.0 LICENSE
cmd 包实现基础命令的数据模型,并实现基础命令业务逻辑 cmd基础包中定义的 常量
Index ¶
Constants ¶
View Source
const CmdRun = "cmd.run"
标准命令
View Source
const DefaultCmdTimeout int = 60000
默认执行命令超时时间 单位 毫秒
View Source
const ProxyHttp = "proxy.http"
http proxy
View Source
const Req_ping = "req_ping"
心跳消息
View Source
const Res_prefix = "res_"
返回结果前缀
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct { *Head `json:"head"` Body string `json:"body,omitempty"` //实际的命令参数或二进制数据的base64编码 }
基础命令结构
type CmdResult ¶
type CmdResult struct { Type string `json:"type,omitempty"` JobId string `json:"jobId,omitempty"` //任务id, 命令唯一序列号 Async int `json:"async"` //标志是否异步命令 IsTimeout bool `json:"isTimeout,omitempty"` Stdout string `json:"stdout,omitempty"` Stderr string `json:"stderr,omitempty"` }
基础命令 返回结果结构
Click to show internal directories.
Click to hide internal directories.