local

package
v0.0.0-...-a7a8f6c Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 1 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 interface {
	// Get returns the key value
	Get(key []byte) ([]byte, error)
	// Set sets the key value to the local storage
	Set(key, value []byte) error
	// Remove remove the key from the local storage
	Remove(key []byte) error
	// Range visit all values that start with prefix, set limit to 0 for no limit
	Range(prefix []byte, limit uint64, fn func(key, value []byte) bool) error
}

Storage local data storage

func NewBadgerStorage

func NewBadgerStorage(dir string) (Storage, error)

NewBadgerStorage returns a local storage using badger

Jump to

Keyboard shortcuts

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