Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCorruptData = errors.New("the record has been corrupted")
ErrCorruptData is returned when the data mismatches the stored checksum
var ErrInsufficientData = errors.New("could not parse bytes")
ErrInsufficientData is returned when the given data is not enouch to be parsed into a Record
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record is a database record
func FromBytes ¶
FromBytes deserialize []byte into a record. If the data cannot be deserialized a wrapped ErrParse error will be returned.
func NewTombstone ¶
NewTombstone returns a new record of tombstone kind
func (*Record) IsTombstone ¶
IsTombstone returns true if the record is of tombstone kind
type Scanner ¶
Scanner implements the bufio.Scanner interface with a custom split function for tokenizing Records
func NewScanner ¶
NewScanner returns a new Record-Scanner for the reader. maxScanTokenSize is the largest possible size that the scanner will buffer and should be set to at least the byte size of the key and value combined.