kvhttp

package
v0.0.0-...-c2b9891 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(db kv.Database) http.Handler

Types

type DB

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

func New

func New(baseURL *url.URL, client *http.Client) *DB

func (*DB) Close

func (db *DB) Close() error

func (*DB) NewSnapshot

func (db *DB) NewSnapshot(ctx context.Context) (kv.Snapshot, error)

func (*DB) NewTransaction

func (db *DB) NewTransaction(ctx context.Context) (kv.Transaction, error)

func (*DB) ServerURL

func (db *DB) ServerURL() url.URL

type Iter

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

func (*Iter) Fetch

func (it *Iter) Fetch(ctx context.Context, next bool) (string, io.Reader, error)

type Snap

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

func (*Snap) Ascend

func (snap *Snap) Ascend(ctx context.Context, begin, end string) (kv.Iterator, error)

func (*Snap) Descend

func (snap *Snap) Descend(ctx context.Context, begin, end string) (kv.Iterator, error)

func (*Snap) Discard

func (snap *Snap) Discard(ctx context.Context) error

func (*Snap) Get

func (snap *Snap) Get(ctx context.Context, key string) (io.Reader, error)

func (*Snap) Scan

func (snap *Snap) Scan(ctx context.Context) (kv.Iterator, error)

type Tx

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

func (*Tx) Ascend

func (tx *Tx) Ascend(ctx context.Context, begin, end string) (kv.Iterator, error)

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) Delete

func (tx *Tx) Delete(ctx context.Context, key string) error

func (*Tx) Descend

func (tx *Tx) Descend(ctx context.Context, begin, end string) (kv.Iterator, error)

func (*Tx) Get

func (tx *Tx) Get(ctx context.Context, key string) (io.Reader, error)

func (*Tx) Rollback

func (tx *Tx) Rollback(ctx context.Context) error

func (*Tx) Scan

func (tx *Tx) Scan(ctx context.Context) (kv.Iterator, error)

func (*Tx) Set

func (tx *Tx) Set(ctx context.Context, key string, value io.Reader) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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