item

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HeaderSize  = 12
	TrailerSize = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Key  Key
	Blob []byte
}

func (*Item) Copy

func (i *Item) Copy() Item

func (Item) StorageSize

func (i Item) StorageSize() Off

func (Item) String

func (i Item) String() string

type Items

type Items []Item

Items is a list of items.

func (Items) Copy

func (items Items) Copy() Items

func (Items) StorageSize

func (items Items) StorageSize() Off

type Key

type Key int64

Key is a priority key in the queue. It has to be unique to avoid overwriting other entries. This was written with unix nanosecond epoch stamps in mind.

func KeyFromString

func KeyFromString(s string) (Key, error)

KeyFromString is the reverse of String()

func (Key) String

func (k Key) String() string

type Location

type Location struct {
	// Key is the priority key of the first item in the batch
	Key Key

	// Off is the offset in bytes to the start of the batch in the vlog.
	Off Off

	// Len is the number of items in this batch.
	// A zero len has a special meaning: this batch was deleted.
	Len Off
}

Location references the location of a batch in dat.log

func (Location) String

func (l Location) String() string

type Off

type Off uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL