Documentation ¶
Index ¶
- Constants
- Variables
- func BoolVarAlias(varPtr *bool, shortflag string, longflag string, defaultVal bool, ...)
- func ByteCountFromSizeString(sizeStr string) (uint64, error)
- func IntVarAlias(varPtr *int, shortflag string, longflag string, defaultVal int, ...)
- func PrintSize(bytes uint64) string
- func PrintUsageDefaults(shortflag string, longflag string, defaultVal string, description string)
- func PrintfIfDebug(format string, values ...interface{})
- func RetriableOperation(operation func(r int) error) (duration time.Duration, startTime time.Time, numOfRetries int)
- func StringListVarAlias(varPtr *ListFlag, shortflag string, longflag string, defaultVal string, ...)
- func StringVarAlias(varPtr *string, shortflag string, longflag string, defaultVal string, ...)
- func Uint64VarAlias(varPtr *uint64, shortflag string, longflag string, defaultVal uint64, ...)
- type ListFlag
Constants ¶
const ( KB = uint64(1024) MB = 1024 * KB GB = 1024 * MB TB = 1024 * GB KBF = float64(KB) MBF = float64(MB) GBF = float64(GB) TBF = float64(TB) )
/////////////////////////////////////////////////////////////////
Storage sizes -- print and scan bytes, and sizes suffixed with KB,MB,GB,TB
////////////////////////////////////////////////////////////////
const BufferQCapacity = 50
BufferQCapacity number of pre-allocated buffers
const LargeBlockAPIVersion = "2018-03-28"
LargeBlockAPIVersion API version that supports large block blobs
const LargeBlockSizeMax = 100 * MB
LargeBlockSizeMax maximum block size
const MaxBlockCount = 50000 // no more than this many blob blocks permitted
MaxBlockCount the maximum number of blocks in a blob
const MiByte = 1048576
MiByte bytes in one MiB
Variables ¶
var Verbose = false
Verbose mode active?
Functions ¶
func BoolVarAlias ¶
func BoolVarAlias(varPtr *bool, shortflag string, longflag string, defaultVal bool, description string)
BoolVarAlias bool commandline option
func ByteCountFromSizeString ¶
ByteCountFromSizeString accepts byte count, or integer suffixed with B, KB, MB, GB. ... Return the corresponding count of bytes.
func IntVarAlias ¶
func IntVarAlias(varPtr *int, shortflag string, longflag string, defaultVal int, description string)
IntVarAlias int commandline option
func PrintUsageDefaults ¶
PrintUsageDefaults print commandline usage options
func PrintfIfDebug ¶ added in v0.5.12
func PrintfIfDebug(format string, values ...interface{})
PrintfIfDebug TODO
func RetriableOperation ¶
func RetriableOperation(operation func(r int) error) (duration time.Duration, startTime time.Time, numOfRetries int)
RetriableOperation executes a function, retrying up to "retryLimit" times and waiting "retrySleepDuration" between attempts
func StringListVarAlias ¶
func StringListVarAlias(varPtr *ListFlag, shortflag string, longflag string, defaultVal string, description string)
StringListVarAlias string commandline option