Documentation
¶
Overview ¶
Package shard ports DatoriumDB document sharding helpers (CRC32 of the sharding prefix → 8-bit slot).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RawSlot ¶
RawSlot returns the 8-bit shard slot for an arbitrary byte string using CRC32 with no document-ID prefix detection. Search result shards use this.
func RawSlotHex ¶
RawSlotHex returns the two-character uppercase hex form of RawSlot.
func Slot ¶
Slot returns the 8-bit shard slot for a document ID using CRC32 of the sharding prefix. Periods in the first six rune positions are ignored for prefix detection. If there is no later period, the whole ID is used.
func ValidateFullCoverage ¶
ValidateFullCoverage ensures ranges cover every slot 0x00-0xFF without overlap.
Types ¶
type Range ¶
Range describes an inclusive hex shard range such as "00-7F".
func ParseRange ¶
ParseRange parses "AA-BB" or a single slot "7A".