backupds

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0, MIT Imports: 18 Imported by: 15

Documentation

Index

Constants

View Source
const NoLogdir = ""

Variables

This section is empty.

Functions

func ReadBackup

func ReadBackup(r io.Reader, cb func(key datastore.Key, value []byte, log bool) error) (bool, error)

func RestoreInto

func RestoreInto(r io.Reader, dest datastore.Batching) error

Types

type Datastore

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

func Wrap

func Wrap(child datastore.Batching, logdir string) (*Datastore, error)

func (*Datastore) Backup

func (d *Datastore) Backup(ctx context.Context, out io.Writer) error

Writes a datastore dump into the provided writer as [array(*) of [key, value] tuples, checksum]

func (*Datastore) Batch

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

func (*Datastore) Close

func (d *Datastore) Close() error

func (*Datastore) CloseLog added in v1.5.1

func (d *Datastore) CloseLog() error

func (*Datastore) Delete

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

func (*Datastore) Get

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

func (*Datastore) GetSize

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

func (*Datastore) Has

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

func (*Datastore) Put

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

func (*Datastore) Query

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

func (*Datastore) Sync

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

type Entry added in v1.5.1

type Entry struct {
	Key, Value []byte
	Timestamp  int64
}

func (*Entry) MarshalCBOR added in v1.5.1

func (t *Entry) MarshalCBOR(w io.Writer) error

func (*Entry) UnmarshalCBOR added in v1.5.1

func (t *Entry) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

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