Documentation ¶
Index ¶
- Constants
- func CookieToBytes(bytes []byte, cookie Cookie)
- func NeedleIdToBytes(bytes []byte, needleId NeedleId)
- func NeedleIdToUint64(needleId NeedleId) uint64
- func OffsetToBytes(bytes []byte, offset Offset)
- func SizeToBytes(bytes []byte, size Size)
- type Cookie
- type DiskType
- type NeedleId
- type Offset
- type OffsetHigher
- type OffsetLower
- type Size
Constants ¶
View Source
const ( NeedleIdSize = 8 NeedleIdEmpty = 0 )
View Source
const ( SizeSize = 4 // uint32 size NeedleHeaderSize = CookieSize + NeedleIdSize + SizeSize NeedleMapEntrySize = NeedleIdSize + OffsetSize + SizeSize TimestampSize = 8 // int64 size NeedlePaddingSize = 8 TombstoneFileSize = Size(-1) CookieSize = 4 )
View Source
const ( OffsetSize = 4 MaxPossibleVolumeSize uint64 = 4 * 1024 * 1024 * 1024 * 8 // 32GB )
Variables ¶
This section is empty.
Functions ¶
func CookieToBytes ¶
func NeedleIdToBytes ¶
func NeedleIdToUint64 ¶
NeedleIdToUint64 used to send max needle id to master
func OffsetToBytes ¶
func SizeToBytes ¶
Types ¶
type DiskType ¶
type DiskType string
const ( HardDriveType DiskType = "" SsdType = "ssd" )
func ToDiskType ¶
func (DiskType) ReadableString ¶
type NeedleId ¶
type NeedleId uint64
func BytesToNeedleId ¶
func ParseNeedleId ¶
func Uint64ToNeedleId ¶
type Offset ¶
type Offset struct { OffsetHigher OffsetLower }
func BytesToOffset ¶
func Uint32ToOffset ¶
only for testing, will be removed later.
func (Offset) ToActualOffset ¶
type OffsetHigher ¶
type OffsetHigher struct { }
type OffsetLower ¶
type OffsetLower struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.