db

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupHandler

func BackupHandler(db Database) func(http.ResponseWriter, *http.Request)

BackupHandler for accepting requests to initiate a new database backup.

Types

type Database

type Database = iface.Database

Database defines the necessary methods for Prysm's eth2 backend which may be implemented by any key-value or relational database in practice. This is the full database interface which should not be used often. Prefer a more restrictive interface in this package.

func NewDB

func NewDB(dirPath string, stateSummaryCache *cache.StateSummaryCache) (Database, error)

NewDB initializes a new DB.

type HeadAccessDatabase added in v0.3.2

type HeadAccessDatabase = iface.HeadAccessDatabase

HeadAccessDatabase exposes Prysm's eth2 backend for read/write access with information about chain head information. This interface should be used sparingly as the HeadFetcher is the source of truth around chain head information while this interface serves as persistent storage for the head fetcher.

See github.com/prysmaticlabs/prysm/blockchain.HeadFetcher

type NoHeadAccessDatabase added in v0.3.2

type NoHeadAccessDatabase = iface.NoHeadAccessDatabase

NoHeadAccessDatabase exposes Prysm's eth2 data backend for read/write access, no information about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.

type ReadOnlyDatabase added in v0.3.2

type ReadOnlyDatabase = iface.ReadOnlyDatabase

ReadOnlyDatabase exposes Prysm's eth2 data backend for read access only, no information about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.

Directories

Path Synopsis
Package filters specifies utilities for building a set of data attribute filters to be used when filtering data through database queries in practice.
Package filters specifies utilities for building a set of data attribute filters to be used when filtering data through database queries in practice.
Package iface exists to prevent circular dependencies when implementing the database interface.
Package iface exists to prevent circular dependencies when implementing the database interface.

Jump to

Keyboard shortcuts

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