mem

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: 3 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-memory. This storage is ephemeral; it should not be used for production.

func New

func New() (*Store, error)

New creates a new memory 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 a value for a given key.

Jump to

Keyboard shortcuts

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