mem

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosed = errors.New("datastore closed")

Functions

This section is empty.

Types

type Batch

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

func (*Batch) Commit

func (b *Batch) Commit(ctx context.Context) error

func (*Batch) Delete

func (b *Batch) Delete(ctx context.Context, key datastore.Key) error

func (*Batch) Put

func (b *Batch) Put(ctx context.Context, key datastore.Key, value []byte) error

type Datastore

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

func New

func New() *Datastore

func (*Datastore) Batch

func (ds *Datastore) Batch(ctx context.Context) (datastore.Batch, error)

func (*Datastore) Close

func (ds *Datastore) Close() error

func (*Datastore) Delete

func (ds *Datastore) Delete(ctx context.Context, key datastore.Key) (err error)

func (*Datastore) Get

func (ds *Datastore) Get(ctx context.Context, key datastore.Key) (value []byte, err error)

func (*Datastore) GetSize

func (ds *Datastore) GetSize(ctx context.Context, key datastore.Key) (size int, err error)

func (*Datastore) Has

func (ds *Datastore) Has(ctx context.Context, key datastore.Key) (exists bool, err error)

func (*Datastore) Put

func (ds *Datastore) Put(ctx context.Context, key datastore.Key, value []byte) error

func (*Datastore) Query

func (ds *Datastore) Query(ctx context.Context, q query.Query) (query.Results, error)

func (*Datastore) Sync

func (ds *Datastore) Sync(ctx context.Context, prefix datastore.Key) error

Jump to

Keyboard shortcuts

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