bboltstorage

package module
v0.0.0-...-58985f2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	DB     *bbolt.DB
	Bucket []byte
}

Implements the ghtransport.Storage interface using go.etcd.io/bbolt.

func MustOpen

func MustOpen(path string, mode os.FileMode, options *bbolt.Options, bucket []byte) *Storage

MustOpen is a wrapper around Open that panics if an error occurs.

func Open

func Open(path string, mode os.FileMode, options *bbolt.Options, bucket []byte) (*Storage, error)

Open is a wrapper around bbolt.Open that returns an initialized Storage.

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, u *url.URL) (body io.ReadCloser, header http.Header, err error)

func (*Storage) Put

func (s *Storage) Put(ctx context.Context, u *url.URL, body []byte, header http.Header) (err error)

Jump to

Keyboard shortcuts

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