Versions in this module Expand all Collapse all v1 v1.0.0 Apr 5, 2021 Changes in this version + const MaxPort + var RetryAnyError = func(_ error) bool + func BinaryExistsInPath(processName string) bool + func Bool2Int(b bool) int + func CatFile(filePath string, desc string) + func CheckOldMan(version uint64, maxAge time.Duration) error + func Contains(set map[string]struct{}, key string) bool + func ConvertToRelativePath(path string) string + func DeepCopyList(in []string) (out []string) + func DirExists(dir string) bool + func FetchTimestampWithRetry(oracleFac oracle.Factory) (ts uint64, err error) + func FindAvailablePort(port int, isPortAvailable func(int) bool) int + func GenerateAllPossibleOrders(array []string) [][]string + func GetCoordinatorName(enableV3 bool) string + func GetLocalTimestamp() uint64 + func GetLogLevel() int + func IsDebug() bool + func IsKilled(err error) bool + func IsPortAvailable(port int) bool + func IsPowerOf2(x int) bool + func IsTerminated(err error) bool + func IsTooOld(version uint64, maxAge time.Duration) bool + func JsonDecode(v interface{}, b []byte) error + func JsonEncode(v interface{}) []byte + func JsonEncodeCompacted(v interface{}) []byte + func MaxDuration(a, b time.Duration) time.Duration + func MaxInt(a, b int) int + func MaxUint64(a, b uint64) uint64 + func MinInt(a, b int) int + func MinUint64(a, b uint64) uint64 + func MkdirIfNotExists(dir string) error + func MustFetchTimestamp(oracleFac oracle.Factory) uint64 + func NewBool(b bool) *bool + func NonInPlaceSort(array []string) []string + func Now() *time.Time + func PrepareEmptyDir(dir string) error + func RandomKey(length int) string + func RandomPeriod(unit time.Duration, min, max int) time.Duration + func RandomSequence(n int) []int + func RandomShuffle(seq []int) + func Range(n int) []int + func RemoveDirIfExists(dir string) error + func Set2StringList(m map[string]bool) []string + func SetCustomizedDebugFlag(b bool) + func SetLogLevel(v int) func() + func StringList2Set(keys []string) map[string]bool + func TrimmedSplit(str string, sep string) []string + func TryPort(port int) error + func Version() string + func VersionString(ver, rev, buildAt string) string + func WithContextRetry(ctx context.Context, interval, max int, f func(ctx context.Context) error) error + func WithContextRetryEx(ctx context.Context, interval, timeout time.Duration, ...) error + func WithLogLevel(v int, f func()) + func WithRetry(interval, max int, f func(ctx context.Context) error) error + func WithSafeContextRetryEx(ctx context.Context, interval, timeout time.Duration, ...) error