inmem

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

InmemBackend is an in-memory only physical backend. It is useful for testing and development situations where the data is not expected to be durable.

func New

func New(ctx context.Context) (*Storage, error)

New creates a new object that implements the Storage interface in memory. It is thread-safe.

func (*Storage) List

func (ts *Storage) List(ctx context.Context, msg proto.Message) ([]string, error)

List implements the Storage interface

func (*Storage) Load

Load implements the Storage interface

func (*Storage) Remove

Remove implements the Storage interface

func (*Storage) Store

Store implements the Storage interface.

If the message already exists, it is overwritten.

Jump to

Keyboard shortcuts

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