badger

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store holds key/value pairs in a badger database.

func New

func New(base string) (*Store, error)

New creates a new badger storage.

func (*Store) Fetch

func (s *Store) Fetch(ctx context.Context, key []byte) ([]byte, error)

Fetch fetches a value for a given key.

func (*Store) Store

func (s *Store) Store(ctx context.Context, key []byte, value []byte) error

Store stores the value for a given key.

Jump to

Keyboard shortcuts

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