bootstrapdb

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Kademlia string
}

Config configures storage node database

type DB

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

DB contains access to different database tables

func New

func New(config Config) (*DB, error)

New creates a new master database for storage node

func NewInMemory

func NewInMemory(storageDir string) (*DB, error)

NewInMemory creates new inmemory master database for storage node TODO: still stores data on disk

func (*DB) Close

func (db *DB) Close() error

Close closes any resources.

func (*DB) CreateTables

func (db *DB) CreateTables() error

CreateTables initializes the database

func (*DB) RoutingTable

func (db *DB) RoutingTable() (kdb, ndb, adb storage.KeyValueStore)

RoutingTable returns kademlia routing table

Jump to

Keyboard shortcuts

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