Documentation ¶
Index ¶
- Constants
- Variables
- func CheckSpeedValue(sp string) error
- func CheckTimeValue(timeStr string) error
- func GetBlockKbytes(valueStr string) (int64, string, error)
- func GetBytes(byteStr string) (int64, error)
- func GetContainerPath(tool string) string
- func GetCtxWithTraceId(ctx context.Context, traceId string) context.Context
- func GetKBytes(byteStr string) (int64, error)
- func GetNumArrByCount(count int, listArr []int) []int
- func GetNumArrByList(listStr string) ([]int, error)
- func GetRunPath() string
- func GetSleepRecoverCmd(sleepTime int64, uid string) string
- func GetTimeSecond(timeStr string) (int64, error)
- func GetToolDir() string
- func GetToolPath(tool string) string
- func GetTraceId(ctx context.Context) string
- func IsValidUid(uid string) error
- func NewUid() string
- func StrListContain(arr []string, target string) bool
Constants ¶
View Source
const ( NoPid = -1 BuilderSplit = "-" CmdSplit = " && " PortSplit = "-" RootName = "chaosmetad" TimeFormat = "2006-01-02 15:04:05" RecoverLog = "/tmp/chaosmetad_recover.log" )
common value
View Source
const ( DARWIN = "darwin" LINUX = "linux" )
os
View Source
const ( MethodValidator = "validator" MethodInject = "inject" MethodRecover = "recover" )
View Source
const ( StatusCreated = "created" StatusSuccess = "success" StatusError = "error" StatusDestroyed = "destroyed" )
task status
View Source
const (
CtxTraceId = "TraceId"
)
Variables ¶
View Source
var TraceId string
TraceId for command line
Functions ¶
func CheckSpeedValue ¶
func CheckTimeValue ¶
func GetBlockKbytes ¶
GetBlockKbytes
@Description: @param valueStr: input value string @return int64: value in unit kb @return string: standardized value string @return error
func GetContainerPath ¶
func GetCtxWithTraceId ¶
func GetNumArrByCount ¶
func GetNumArrByList ¶
func GetRunPath ¶
func GetRunPath() string
func GetSleepRecoverCmd ¶
func GetTimeSecond ¶
func GetToolDir ¶
func GetToolDir() string
func GetToolPath ¶
func GetTraceId ¶
func IsValidUid ¶
func StrListContain ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.