storage

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 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

	GetPulseKeys(record.PulseNum) ([][]byte, error)

	GetDrop(record.PulseNum) (*jetdrop.JetDrop, error)
	SetDrop(record.PulseNum, *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

Jump to

Keyboard shortcuts

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