store

package
v0.0.0-...-78d0e39 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Path string
	// contains filtered or unexported fields
}
var Store *DB

func OpenDB

func OpenDB(path string) (*DB, error)

OpenDB opens a node database for storing and retrieving infos about known peers in the network. If no path is given an in-memory, temporary database is constructed.

func (*DB) Close

func (d *DB) Close()

func (*DB) Get

func (d *DB) Get(key []byte) []byte

func (*DB) Has

func (d *DB) Has(key []byte) bool

func (*DB) Save

func (d *DB) Save(key, value []byte) error

Jump to

Keyboard shortcuts

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