dreamfactory_cmd/cmd/v2/lib/base.go
2023-06-09 21:58:02 +08:00

41 lines
807 B
Go

package lib
import "time"
type RawReq struct {
ID int64
Req []byte
}
type RawResp struct {
ID int64
Resp []byte
Err error
Elapse time.Duration
}
type ResCode int
const (
RES_CODE_SUCCESS ResCode = 0 //成功
RES_CODE_CALL_TIMEOUT = 1001 //调用超时
RES_CODE_ERROR_CALL = 2001 // 调用错误
RES_CODE_ERROR_RESPONSE = 2002 // 响应错误
RES_CODE_ERROR_CALEE = 2003 // 被测软件内部错误
RES_CODE_FATAL_CALL = 3001 // 调用过程中发生了致命错误!
)
//助手执行状态
const (
// 原始状态
STATUS_ORIGINAL uint32 = 0
// 正在启动
STATUS_STARTING uint32 = 1
//已启动
STATUS_STARTED uint32 = 2
//正在停止
STATUS_STOPPING uint32 = 3
// 已停止
STATUS_STOPPED uint32 = 4
)