kvstore

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates that a value for the key does not exist
	ErrNotFound = errors.New("value for key not found")
)

Functions

This section is empty.

Types

type KVStore

type KVStore interface {

	/**
	 * Store sets the value for the key.
	 */
	Store(key interface{}, value interface{}) error

	/**
	 * Load returns the value stored in the store for a key.
	 * If a value for the key was not found, returns (nil, ErrNotFound)
	 */
	Load(key interface{}) (interface{}, error)

	/**
	 * Delete deletes the value for a key.
	 */
	Delete(key interface{}) error
}

KVStore is a generic key-value store interface.

Jump to

Keyboard shortcuts

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