memorystorage

package module
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (storagecore.Storage, error)

New constructs in-memory storage. @group Driver Constructors

Example: memory storage

fs, _ := memorystorage.New(memorystorage.Config{
	Prefix: "sandbox",
})
_ = fs

func NewContext

func NewContext(ctx context.Context, cfg Config) (storagecore.Storage, error)

Types

type Config

type Config struct {
	Prefix string
}

Config defines an in-memory storage disk. @group Driver Config

Example: define memory storage config

cfg := memorystorage.Config{}
_ = cfg

Example: define memory storage config with all fields

cfg := memorystorage.Config{
	Prefix: "sandbox", // default: ""
}
_ = cfg

func (Config) DriverName

func (Config) DriverName() string

func (Config) ResolvedConfig

func (c Config) ResolvedConfig() storagecore.ResolvedConfig

Jump to

Keyboard shortcuts

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