Documentation ¶
Index ¶
- func AmendTaskExtraAttr(origin, new string) string
- func CheckFileLength(filepath string) error
- func CheckMailType(mailtype string) bool
- func CheckNameValid(name string) bool
- func CheckNodeList(nodeStr string) bool
- func CheckTaskArgs(task *protos.TaskToCtld) error
- func CheckTaskExtraAttr(attr string) bool
- func ErrMsg(err_code protos.ErrCode) string
- func FoundFirstNumberWithoutBrackets(input string) (int, int, bool)
- func HostNameListToStr(hostList []string) string
- func HostNameListToStr_(hostList []string) ([]string, bool)
- func InvalidDuration() *durationpb.Duration
- func ParseDuration(time string, duration *durationpb.Duration) bool
- func ParseFloatWithPrecision(val string, decimalPlaces int) (float64, error)
- func ParseGres(gres string) *protos.DeviceMap
- func ParseHostList(hostStr string) ([]string, bool)
- func ParseInRamTaskStatusList(statesStr string) ([]protos.TaskStatus, error)
- func ParseInterval(interval string, intervalpb *protos.TimeInterval) (err error)
- func ParseJobIdList(jobIds string, splitStr string) ([]uint32, error)
- func ParseMemStringAsByte(mem string) (uint64, error)
- func ParseNodeList(nodeStr string) ([]string, bool)
- func ParseStringParamList(parameters string, splitStr string) ([]string, error)
- func ParseTaskStatusList(statesStr string) ([]protos.TaskStatus, error)
- func ParseTaskStatusName(state string) (protos.TaskStatus, error)
- func ParseTime(ts string) (time.Time, error)
- func RemoveBracketsWithoutDashOrComma(input string) string
- func SecondTimeFormat(second int64) string
- type CraneCmdError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmendTaskExtraAttr ¶
Merge two JSON strings. If there are overlapping keys, values from the second JSON take precedence.
func CheckFileLength ¶
CheckFileLength check if the file length is within the limit.
func CheckMailType ¶
func CheckNameValid ¶
func CheckNodeList ¶
CheckNodeList check if the node list is comma separated node names. The node name should contain only letters and numbers, and start with a letter, end with a number.
func CheckTaskArgs ¶
func CheckTaskArgs(task *protos.TaskToCtld) error
func CheckTaskExtraAttr ¶
func HostNameListToStr ¶
func HostNameListToStr_ ¶
func InvalidDuration ¶
func InvalidDuration() *durationpb.Duration
func ParseDuration ¶
func ParseDuration(time string, duration *durationpb.Duration) bool
func ParseFloatWithPrecision ¶
Parses a string containing a float number with a given precision.
func ParseHostList ¶
func ParseInRamTaskStatusList ¶
func ParseInRamTaskStatusList(statesStr string) ([]protos.TaskStatus, error)
func ParseInterval ¶
func ParseInterval(interval string, intervalpb *protos.TimeInterval) (err error)
func ParseMemStringAsByte ¶
func ParseNodeList ¶
func ParseStringParamList ¶
func ParseTaskStatusList ¶
func ParseTaskStatusList(statesStr string) ([]protos.TaskStatus, error)
func ParseTaskStatusName ¶
func ParseTaskStatusName(state string) (protos.TaskStatus, error)
func SecondTimeFormat ¶
Types ¶
type CraneCmdError ¶
type CraneCmdError = int
const ( ErrorSuccess CraneCmdError = 0 ErrorGeneric CraneCmdError = 1 ErrorCmdArg CraneCmdError = 2 ErrorNetwork CraneCmdError = 3 ErrorBackend CraneCmdError = 4 ErrorInvalidFormat CraneCmdError = 5 )
general
Click to show internal directories.
Click to hide internal directories.