quantum

package module
v0.0.0-...-c10370f Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

quantum

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpace

func GetSpace[K, V comparable](spaceID types.SpaceID, db *DB) (*space.Space[K, V], error)

GetSpace retrieves space from snapshot.

Types

type Config

type Config struct {
	State *state.State
}

Config stores snapshot configuration.

type DB

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

DB represents the database.

func New

func New(config Config) *DB

New creates new database.

func (*DB) ApplyTransaction

func (db *DB) ApplyTransaction(tx any)

ApplyTransaction adds transaction to the queue.

func (*DB) Close

func (db *DB) Close()

Close tells that there will be no more operations done.

func (*DB) Commit

func (db *DB) Commit() error

Commit commits current snapshot and returns next one.

func (*DB) DeleteSnapshot

func (db *DB) DeleteSnapshot(snapshotID types.SnapshotID)

DeleteSnapshot deletes snapshot.

func (*DB) Run

func (db *DB) Run(ctx context.Context) error

Run runs db goroutines.

type SpaceToCommit

type SpaceToCommit struct {
	HashMod         *uint64
	Root            *types.Pointer
	SpaceInfoValue  *space.Entry[types.SpaceID, types.Pointer]
	OriginalPointer types.Pointer
}

SpaceToCommit represents requested space which might require to be committed.

Directories

Path Synopsis
avo command
compare/avo command
tx

Jump to

Keyboard shortcuts

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