Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicUpdateMaxUint32 ¶
AtomicUpdateMaxUint32 updates the value in store using atomic memory primitives. newValue will only be placed in store if newValue is larger than the current value in store. To avoid inconsistency parallel updates to store should be avoided.
func DecToUint64 ¶
DecToUint64 is a convenience function to extract a decimal string to a uint64 and not worry about errors. Essentially a "mustConvertDecToUint64".
func HexToUint64 ¶
HexToUint64 is a convenience function to extract a hex string to a uint64 and not worry about errors. Essentially a "mustConvertHexToUint64".
func IsValidString ¶
IsValidString checks if string is UTF-8-encoded and only contains expected characters.
func NextPowerOfTwo ¶
NextPowerOfTwo returns input value if it's a power of two, otherwise it returns the next power of two.
func VersionUint ¶
VersionUint returns a single integer composed of major, minor, patch.
Types ¶
type OnDiskFileIdentifier ¶
type OnDiskFileIdentifier struct { DeviceID uint64 // dev_t as reported by stat. InodeNum uint64 // ino_t should fit into 64 bits }
OnDiskFileIdentifier can be used as unique identifier for a file. It is a structure to identify a particular file on disk by deviceID and inode number.
func (OnDiskFileIdentifier) Hash32 ¶
func (odfi OnDiskFileIdentifier) Hash32() uint32