storage

package
v0.2010.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package storage implements the storage backend.

Index

Constants

View Source
const (
	// CfgBackend configures the storage backend flag.
	CfgBackend = "storage.backend"

	// CfgLRUSlots configures the LRU apply lock slots.
	CfgLRUSlots = "storage.root_cache.apply_lock_lru_slots"

	// CfgMaxCacheSize configures the maximum in-memory cache size.
	CfgMaxCacheSize = "storage.max_cache_size"
)

Variables

Flags has the configuration flags.

Functions

func New

func New(
	ctx context.Context,
	dataDir string,
	namespace common.Namespace,
	identity *identity.Identity,
	opts ...Option,
) (api.Backend, error)

New constructs a new Backend based on the configuration flags.

Types

type Option

type Option func(o *options)

Option is a storage configuration option.

func WithConsensus

func WithConsensus(consensus consensus.Backend) Option

WithConsensus configures the consensus backend to use with storage backends which require access to the consensus layer. In case this option is not specified using such backends will fail.

func WithRuntime

func WithRuntime(runtime registry.RuntimeDescriptorProvider) Option

WithRuntime configures the runtime to use for looking up storage parameters. In case this option is not specified default safe values will be used.

Directories

Path Synopsis
Package api implements the storage backend API.
Package api implements the storage backend API.
Package client implements a client for Oasis storage nodes.
Package client implements a client for Oasis storage nodes.
Package database implements a database backed storage backend.
Package database implements a database backed storage backend.
Package mkvs provides a Merklized Key-Value Store (MKVS) implementation.
Package mkvs provides a Merklized Key-Value Store (MKVS) implementation.
checkpoint
Package checkpoint provides methods for creating MKVS checkpoints.
Package checkpoint provides methods for creating MKVS checkpoints.
db
db/api
Package api provides a persistent node database interface for MKVS trees.
Package api provides a persistent node database interface for MKVS trees.
db/badger
Package badger provides a Badger-backed node database.
Package badger provides a Badger-backed node database.
interop
MKVS interoperability test helpers.
MKVS interoperability test helpers.
interop/cmd
Package cmd implements the commands for MKVS interoperability test helpers.
Package cmd implements the commands for MKVS interoperability test helpers.
node
Package node defines MKVS tree nodes.
Package node defines MKVS tree nodes.
syncer
Package syncer provides the read-only sync interface.
Package syncer provides the read-only sync interface.
tests
Package tests contains helpers for testing MKVS trees.
Package tests contains helpers for testing MKVS trees.
Package tests is a collection of storage implementation test cases.
Package tests is a collection of storage implementation test cases.

Jump to

Keyboard shortcuts

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