memory

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package memory defines an in-memory content storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is in-memory implementation of content storage. Should be used only for testing

func NewStorage

func NewStorage() *Storage

func (*Storage) Read

func (s *Storage) Read(ctx context.Context, cid cid.Cid) ([]byte, error)

Read gets message form im-memory map

func (*Storage) Write

func (s *Storage) Write(ctx context.Context, content []byte, cid cid.Cid) error

Read writes message to in-memory map

Jump to

Keyboard shortcuts

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