nutstore

package module
v0.0.0-...-f68f555 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 5 Imported by: 0

README

nutstore

This implementation is no longer maintained. The NutsDB implementation introduced a bunch of breaking changes and the performance is not good enough that it's worth fixing them.

GoDoc

Package nutstore implements the blob.Store interface using NutsDB.

Documentation

Overview

Package nutstore implements the blob.Store interface using NutsDB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Opener

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

Opener constructs a store backed by NutsDB from an address comprising a path, for use with the store package.

Types

type Options

type Options struct {
	Bucket string // use this bucket name
}

Options provides options for opening a NutsDB instance.

type Store

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

Store implements the blob.Store interface using a NutsDB instance.

func Open

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

Open creates a Store by opening the NutsDB specified by opts.

func (Store) Close

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

Close implements part of the blob.Store interface. It closes the underlying database instance and reports its result.

func (Store) Delete

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

Delete implements part of blob.Store.

func (Store) Get

func (s Store) Get(_ context.Context, key string) ([]byte, error)

Get implements part of blob.Store.

func (Store) Len

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

Len implements part of blob.Store.

func (Store) List

func (s Store) List(ctx context.Context, start string, f func(string) error) error

List implements part of blob.Store.

func (Store) Put

func (s Store) Put(_ context.Context, opts blob.PutOptions) error

Put implements part of blob.Store.

Jump to

Keyboard shortcuts

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