database

package
v0.0.0-...-dde17ac Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Overview

Package database defines a beacon chain DB service that can be initialized with either a persistent db, or an in-memory kv-store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconDB

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

BeaconDB defines a service for the beacon chain system's persistent storage.

func NewBeaconDB

func NewBeaconDB(config *BeaconDBConfig) (*BeaconDB, error)

NewBeaconDB initializes a beaconDB instance.

func (*BeaconDB) DB

func (b *BeaconDB) DB() essdb.Database

DB returns the attached essdb instance.

func (*BeaconDB) Start

func (b *BeaconDB) Start()

Start the beacon DB service.

func (*BeaconDB) Stop

func (b *BeaconDB) Stop() error

Stop the beaconDB service gracefully.

type BeaconDBConfig

type BeaconDBConfig struct {
	DataDir  string
	Name     string
	InMemory bool
}

BeaconDBConfig specifies configuration options for the db service.

Jump to

Keyboard shortcuts

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