client

package
v0.0.0-...-0adc8af Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remove

func Remove(addr string, dbname string, timeout int) error

Types

type RemoteDatabase

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

func Open

func Open(addr string, dbname string, createIfNeeded bool, timeout int) (*RemoteDatabase, error)

func (*RemoteDatabase) BeginTX

func (db *RemoteDatabase) BeginTX(table string) (*RemoteTransaction, error)

func (*RemoteDatabase) Close

func (db *RemoteDatabase) Close() error

type RemoteIterator

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

func (*RemoteIterator) Next

func (itr *RemoteIterator) Next() (key []byte, value []byte, err error)

type RemoteTransaction

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

func (*RemoteTransaction) Commit

func (tx *RemoteTransaction) Commit() error

func (*RemoteTransaction) CommitSync

func (tx *RemoteTransaction) CommitSync() error

func (*RemoteTransaction) Get

func (tx *RemoteTransaction) Get(key []byte) ([]byte, error)

func (*RemoteTransaction) Lookup

func (tx *RemoteTransaction) Lookup(lower []byte, upper []byte) (*RemoteIterator, error)

func (*RemoteTransaction) Put

func (tx *RemoteTransaction) Put(key []byte, value []byte) error

Put stores a key/value asynchronously for performance. error will be nil, but a subsequent Commit will fail

func (*RemoteTransaction) PutSync

func (tx *RemoteTransaction) PutSync(key []byte, value []byte) error

PutSync stores a key/value pair waiting for confirmation from the remote server

func (*RemoteTransaction) Rollback

func (tx *RemoteTransaction) Rollback() error

Jump to

Keyboard shortcuts

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