pebblestore

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

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 4 Imported by: 1

README

pebblestore

GoDoc

Package pebblestore implements the blob.Store interface using PebbleDB.

Documentation

Overview

Package pebblestore implements the blob.Store interface using Pebble.

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 PebbleDB from an address comprising a path, for use with the store package.

Types

type Options

type Options struct{}

Options provides options for opening a Pebble database.

type Store

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

Store implements the blob.Store interface using a Pebble database.

func Open

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

Open creates a Store by opening the Pebble database 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) (data []byte, err 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