storage

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package storage contains low level interfaces and common structures for concrete ledger storage engine implementations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound returns if record/index not found in leveldb storage.
	ErrNotFound = errors.New("storage object not found")
)

Functions

This section is empty.

Types

type LedgerStorer

type LedgerStorer interface {
	GetCurrentPulse() record.PulseNum

	GetRecord(*record.Reference) (record.Record, error)
	SetRecord(record.Record) (*record.Reference, error)

	GetClassIndex(*record.Reference) (*index.ClassLifeline, error)
	SetClassIndex(*record.Reference, *index.ClassLifeline) error

	GetObjectIndex(*record.Reference) (*index.ObjectLifeline, error)
	SetObjectIndex(*record.Reference, *index.ObjectLifeline) error

	// GetDrop return Jet's drop by pulse number.
	GetDrop(record.PulseNum) (*jetdrop.JetDrop, error)
	// SetDrop gets previous JetDrop, saves and returns the new one
	// for provided PulseNum.
	SetDrop(record.PulseNum, *jetdrop.JetDrop) (*jetdrop.JetDrop, error)
}

LedgerStorer represents append-only Ladger storage.

Directories

Path Synopsis
Package leveldb contains ledger implementation on top of Go's LevelDB engine
Package leveldb contains ledger implementation on top of Go's LevelDB engine
leveltestutils
Package leveltestutils provides sharable utils for testing LevelDB ledger implementation.
Package leveltestutils provides sharable utils for testing LevelDB ledger implementation.

Jump to

Keyboard shortcuts

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