storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InMemoryEngine = "in_memory"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Set(ctx context.Context, key, value string) error
	Get(ctx context.Context, key string) (string, error)
	Del(ctx context.Context, key string) error
}

type Storage added in v1.1.0

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

func NewStorage added in v1.1.0

func NewStorage(engineConf config.Engine, walConf *config.WAL) (*Storage, error)

func (*Storage) Del added in v1.1.0

func (s *Storage) Del(ctx context.Context, key string) error

func (*Storage) Get added in v1.1.0

func (s *Storage) Get(ctx context.Context, key string) (string, error)

func (*Storage) Set added in v1.1.0

func (s *Storage) Set(ctx context.Context, key, value string) error

func (*Storage) Shutdown added in v1.1.0

func (s *Storage) Shutdown(ctx context.Context) error

type WAL added in v1.1.0

type WAL interface {
	Append(cid compute.CommandID, args []string) concurrency.FutureError
	Restore(fn func(cid compute.CommandID, args []string) error) error
	Shutdown(ctx context.Context) error
}

Directories

Path Synopsis
wal

Jump to

Keyboard shortcuts

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