rpcdb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: BSD-3-Clause Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseClient

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

DatabaseClient is an implementation of database that talks over RPC.

func NewClient

func NewClient(client rpcdbproto.DatabaseClient) *DatabaseClient

NewClient returns a database instance connected to a remote database instance

func (*DatabaseClient) Close

func (db *DatabaseClient) Close() error

Close returns nil

func (*DatabaseClient) Compact

func (db *DatabaseClient) Compact(start, limit []byte) error

Compact returns nil

func (*DatabaseClient) Delete

func (db *DatabaseClient) Delete(key []byte) error

Delete returns nil

func (*DatabaseClient) Get

func (db *DatabaseClient) Get(key []byte) ([]byte, error)

Get returns nil, error

func (*DatabaseClient) Has

func (db *DatabaseClient) Has(key []byte) (bool, error)

Has returns false, nil

func (*DatabaseClient) NewBatch

func (db *DatabaseClient) NewBatch() database.Batch

NewBatch returns a new batch

func (*DatabaseClient) NewIterator

func (db *DatabaseClient) NewIterator() database.Iterator

NewIterator implements the Database interface

func (*DatabaseClient) NewIteratorWithPrefix

func (db *DatabaseClient) NewIteratorWithPrefix(prefix []byte) database.Iterator

NewIteratorWithPrefix implements the Database interface

func (*DatabaseClient) NewIteratorWithStart

func (db *DatabaseClient) NewIteratorWithStart(start []byte) database.Iterator

NewIteratorWithStart implements the Database interface

func (*DatabaseClient) NewIteratorWithStartAndPrefix

func (db *DatabaseClient) NewIteratorWithStartAndPrefix(start, prefix []byte) database.Iterator

NewIteratorWithStartAndPrefix returns a new empty iterator

func (*DatabaseClient) Put

func (db *DatabaseClient) Put(key, value []byte) error

Put returns nil

func (*DatabaseClient) Stat

func (db *DatabaseClient) Stat(property string) (string, error)

Stat returns an error

type DatabaseServer

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

DatabaseServer is a database that is managed over RPC.

func NewServer

func NewServer(db database.Database) *DatabaseServer

NewServer returns a database instance that is managed remotely

func (*DatabaseServer) Close

Close ...

func (*DatabaseServer) Compact

Compact ...

func (*DatabaseServer) Delete

Delete ...

func (*DatabaseServer) Get

Get ...

func (*DatabaseServer) Has

Has ...

func (*DatabaseServer) IteratorError

IteratorError ...

func (*DatabaseServer) IteratorNext

IteratorNext ...

func (*DatabaseServer) IteratorRelease

IteratorRelease ...

func (*DatabaseServer) NewIteratorWithStartAndPrefix

NewIteratorWithStartAndPrefix ...

func (*DatabaseServer) Put

Put ...

func (*DatabaseServer) Stat

Stat ...

func (*DatabaseServer) WriteBatch

WriteBatch ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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