storage

package
v0.0.0-...-4b28da7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotfound = errtrace.New("storage: not found")
	ErrExists   = errtrace.New("storage: already exists")
)

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Get(ctx context.Context, key string) (size int64, r io.ReadCloser, err error)
	Add(ctx context.Context, key string) (TxWriter, error)
	Close() error
}

func NewFSStorage

func NewFSStorage(dataDir string, tempDir string) Storage

type TxWriter

type TxWriter interface {
	io.Writer

	Rollback() error
	Commit(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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