mem

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mem contains a very simple in-memory Impl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proto

func Proto(o opts.Opts) (impl.Impl, error)

Proto opens a Mem with the given Opts.

Types

type Mem added in v0.6.1

type Mem map[string]json.RawMessage

Mem is a very simple in-memory Impl.

func (*Mem) Close added in v0.6.1

func (m *Mem) Close() error

Close nils the underlying map[string][]byte value.

func (*Mem) Del added in v0.6.1

func (m *Mem) Del(key string) error

Del removes the given key from the Mem.

func (*Mem) Get added in v0.6.1

func (m *Mem) Get(key string) ([]byte, error)

Get returns the value in the Mem specified by the given key.

func (*Mem) Keys added in v0.6.1

func (m *Mem) Keys() ([]string, error)

Keys returns the keys of the Mem.

func (*Mem) Set added in v0.6.1

func (m *Mem) Set(key string, data []byte) error

Set assigns the given data to the given key in the Mem.

Jump to

Keyboard shortcuts

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