Documentation ¶
Index ¶
- Constants
- Variables
- 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
Constants ¶
View Source
const MaxPort = 65535
Variables ¶
View Source
var ( RetryAnyError = func(_ error) bool { return true } )
Functions ¶
func BinaryExistsInPath ¶
func ConvertToRelativePath ¶
func DeepCopyList ¶
func FetchTimestampWithRetry ¶
func GetCoordinatorName ¶
func GetLocalTimestamp ¶
func GetLocalTimestamp() uint64
func GetLogLevel ¶
func GetLogLevel() int
func IsPortAvailable ¶
func IsPowerOf2 ¶
func IsTerminated ¶
func JsonDecode ¶
func JsonEncode ¶
func JsonEncode(v interface{}) []byte
func JsonEncodeCompacted ¶
func JsonEncodeCompacted(v interface{}) []byte
func MkdirIfNotExists ¶
func MustFetchTimestamp ¶
func NonInPlaceSort ¶
func PrepareEmptyDir ¶
func RandomSequence ¶
func RandomShuffle ¶
func RandomShuffle(seq []int)
func RemoveDirIfExists ¶
func Set2StringList ¶
func SetCustomizedDebugFlag ¶
func SetCustomizedDebugFlag(b bool)
func SetLogLevel ¶
func SetLogLevel(v int) func()
func StringList2Set ¶
func TrimmedSplit ¶
func VersionString ¶
VersionString show version thing
func WithContextRetry ¶
func WithContextRetryEx ¶
func WithLogLevel ¶
func WithLogLevel(v int, f func())
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.