liuhaijun e94826ce29 add server
Change-Id: I0760f17f6a01c0121b59fcbfafc666032dbc30af
2024-09-19 09:44:15 +00:00

43 lines
623 B
Go

package socket
// ConsoleCommandOp 控制台操作枚举
type ConsoleCommandOp int
// 定义枚举值
const (
// Start 启动
Start ConsoleCommandOp = iota
// Stop 停止
Stop
// Restart 重启
Restart
// Status 状态
Status
// Showlog 日志
Showlog
// Top 内存信息
Top
// Heart 心跳
Heart
)
func OfConsoleCommandOp(value string) ConsoleCommandOp {
switch value {
case "start":
return Start
case "stop":
return Stop
case "restart":
return Restart
case "status":
return Status
case "showlog":
return Showlog
case "top":
return Top
case "heart":
return Heart
}
return Heart
}