memorykvstore

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

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 a KV store that stores []byte(s)

func New

func New() *MemoryKeyValueStore

New *MemoryKeyValueStore is created and returned

func (*MemoryKeyValueStore) Close

func (kvs *MemoryKeyValueStore) Close() error

Close MemoryKeyValueStore, this is a no-op

func (*MemoryKeyValueStore) Get

func (kvs *MemoryKeyValueStore) Get(key string) (io.Reader, error)

Get at Key and copy to io.Reader

func (*MemoryKeyValueStore) Lock

func (kvs *MemoryKeyValueStore) Lock(key string) error

func (*MemoryKeyValueStore) Open

func (kvs *MemoryKeyValueStore) Open() error

Open MemoryKeyValueStore, this is a no-op

func (*MemoryKeyValueStore) Set

func (kvs *MemoryKeyValueStore) Set(key string, reader io.Reader) error

Set at Key, the contents Read from io.Reader; contents not set if errored

func (*MemoryKeyValueStore) Unlock

func (kvs *MemoryKeyValueStore) Unlock(key string) error

Jump to

Keyboard shortcuts

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