rosedbstore

package module
v0.0.0-...-761ce2b Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

README

rosedbstore

GoDoc CI

Package boltstore implements the blob.Store interface using rosedb.

Documentation

Overview

Package rosedbstore implements the blob.StoreCloser interface on rosedb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Opener

func Opener(_ context.Context, addr string) (blob.StoreCloser, error)

Opener constructs a KV from an address comprising a path.

Types

type KV

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

KV implements the blob.KV interface using a rosedb database.

func (KV) Delete

func (s KV) Delete(ctx context.Context, key string) error

Delete implements part of the blob.KV interface.

func (KV) Get

func (s KV) Get(ctx context.Context, key string) ([]byte, error)

Get implements part of the blob.KV interface.

func (KV) Has

func (s KV) Has(ctx context.Context, keys ...string) (blob.KeySet, error)

Has implements part of the blob.KV interface.

func (KV) Len

func (s KV) Len(ctx context.Context) (int64, error)

Len implements part of the blob.KV interface.

func (KV) List

func (s KV) List(ctx context.Context, start string) iter.Seq2[string, error]

List implements part of the blob.KV interface.

func (KV) Put

func (s KV) Put(ctx context.Context, opts blob.PutOptions) error

Put implements part of the blob.KV interface.

type Options

type Options struct{}

Options provide options for opening a rosedb database. A nil *Options is ready for use and provides default values.

type Store

type Store struct {
	*monitor.M[*rosedb.DB, KV]
}

func Open

func Open(path string, opts *Options) (Store, error)

Open creates a KV by opening the rosedb database at path.

func (Store) Close

func (s Store) Close(_ context.Context) error

Close implements part of the blob.KV interface.

Jump to

Keyboard shortcuts

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