mock

package
v0.0.0-...-92cc422 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type ExportedChunk

type ExportedChunk struct {
	Data  []byte           `json:"d"`
	Addrs []common.Address `json:"a"`
}

type Exporter

type Exporter interface {
	Export(w io.Writer) (n int, err error)
}

type GlobalStorer

type GlobalStorer interface {
	Get(addr common.Address, key []byte) (data []byte, err error)
	Put(addr common.Address, key []byte, data []byte) error
	HasKey(addr common.Address, key []byte) bool
	//
	//
	//
	NewNodeStore(addr common.Address) *NodeStore
}

type ImportExporter

type ImportExporter interface {
	Importer
	Exporter
}

type Importer

type Importer interface {
	Import(r io.Reader) (n int, err error)
}

type NodeStore

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

func NewNodeStore

func NewNodeStore(addr common.Address, store GlobalStorer) *NodeStore

func (*NodeStore) Get

func (n *NodeStore) Get(key []byte) (data []byte, err error)

func (*NodeStore) Put

func (n *NodeStore) Put(key []byte, data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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