Versions in this module Expand all Collapse all v1 v1.0.6 Jan 14, 2025 v1.0.5 Jan 14, 2025 Changes in this version + const DefaultCforedServerListenAddress + const DefaultCforedServerListenPort + const DefaultCforedSocketPath + const DefaultConfigPath + const DefaultCraneBaseDir + const DefaultPlugindSocketPath + const MaxJobFileNameLength + const MaxJobFilePathLengthForUnix + const MaxJobFilePathLengthForWindows + const MaxJobNameLength + const MaxJobTimeLimit + const MaxJobTimeStamp + var BUILD_TIME = "Unknown" + var FmtJson = FormatterJson + var VERSION = "Unknown" + 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 DetectNetworkProxy() + func ErrMsg(err_code protos.ErrCode) string + func FormatTable(tableOutputWidth []int, tableHeader []string, tableData [][]string) (formatTableHeader []string, formatTableData [][]string) + func FoundFirstNumberWithoutBrackets(input string) (int, int, bool) + func GetParentProcessID(pid int) (int, error) + func GetPidFromPort(port uint16) (int, error) + func GetStubToCtldByConfig(config *Config) protos.CraneCtldClient + func GetTCPSocket(bindAddr string, config *Config) (net.Listener, error) + func GetUnixSocket(path string, mode fs.FileMode) (net.Listener, error) + func GrpcErrorPrintf(err error, format string, a ...any) + func HostNameListToStr(hostList []string) string + func HostNameListToStr_(hostList []string) ([]string, bool) + func InitLogger(level string) + func InvalidDuration() *durationpb.Duration + func IsForeground() bool + func NixShell(uid string) (string, error) + 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 RemoveFileIfExists(path string) bool + func SecondTimeFormat(second int64) string + func SetBorderTable(table *tablewriter.Table) + func SetBorderlessTable(table *tablewriter.Table) + func SetPropagatedEnviron(task *protos.TaskToCtld) + func SplitEnvironEntry(env *string) (string, string, bool) + func TcGetpgrp(fd int) (pgrp int, err error) + func TcSetpgrp(fd int, pgrp int) (err error) + func TrimTable(rows *[][]string) + func TrimTableExcept(rows *[][]string, excepts ...int) + func Version() string + func VersionTemplate() string + type Config struct + CaCertFilePath string + ControlMachine string + CraneBaseDir string + CraneCtldListenPort string + CranedCforedSockPath string + DomainSuffix string + Plugin PluginConfig + ServerCertFilePath string + ServerKeyFilePath string + UseTls bool + func ParseConfig(configFilePath string) *Config + type CraneCmdError = int + const ErrorBackend + const ErrorCmdArg + const ErrorGeneric + const ErrorInvalidFormat + const ErrorNetwork + const ErrorSuccess + type Formatter interface + FormatReply func(reply interface{}) string + type FormatterJson struct + func (f FormatterJson) FormatReply(reply interface{}) string + type PluginConfig struct + Enabled bool + LogLevel string + Plugins []api.PluginMeta + SockPath string