lotusstore

package module
v0.0.0-...-6f1fef5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

README

lotusstore

GoDoc

Package boltstore implements the blob.Store interface using lotusdb.

Documentation

Overview

Package lotusstore implements the blob.StoreCloser interface on lotusdb.

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 lotusdb 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 lotusdb database. A nil *Options is ready for use and provides default values.

type Store

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

Store implements the blob.StoreCloser interface using a lotusdb database.

func Open

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

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

func (Store) Close

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

Close implements part of the blob.StoreCloser interface.

Jump to

Keyboard shortcuts

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