store

package
v0.0.103-dev Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBlockEntry = errors.New("invalid block entry")

Functions

This section is empty.

Types

type BlockQueueStore

type BlockQueueStore struct {
	// contains filtered or unexported fields
}

BlockQueueStore provides methods to store and retrieve block queues. The store is optimized for two cases: load the entire queue (preserving the original order) and remove an entry from the queue.

Compactor maintains an in-memory queue of blocks to compact, therefore the store never reads individual entries.

NOTE(kolesnikovae): We can leverage the fact that removed entries are always ordered in ascending order by index and use the same cursor when removing entries from the database: DeleteEntry(*bbolt.Tx, ...store.BlockEntry) error

func NewBlockQueueStore

func NewBlockQueueStore() *BlockQueueStore

func (BlockQueueStore) CreateBuckets

func (s BlockQueueStore) CreateBuckets(tx *bbolt.Tx) error

func (BlockQueueStore) DeleteEntry

func (s BlockQueueStore) DeleteEntry(tx *bbolt.Tx, index uint64, id string) error

func (BlockQueueStore) ListEntries

func (BlockQueueStore) StoreEntry

func (s BlockQueueStore) StoreEntry(tx *bbolt.Tx, entry compaction.BlockEntry) error

Jump to

Keyboard shortcuts

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