kvstore

package
v0.0.0-...-bd88772 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package kvstore contains key-value stores

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryKeyValueStore

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

MemoryKeyValueStore is an in-memory key-value store

func NewMemoryKeyValueStore

func NewMemoryKeyValueStore() *MemoryKeyValueStore

NewMemoryKeyValueStore creates a new in-memory key-value store

func (*MemoryKeyValueStore) Get

func (kvs *MemoryKeyValueStore) Get(key string) ([]byte, error)

Get returns a key from the key value store

func (*MemoryKeyValueStore) Set

func (kvs *MemoryKeyValueStore) Set(key string, value []byte) error

Set sets a key into the key value store

Jump to

Keyboard shortcuts

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