cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: AGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheFilesystem

func NewCacheFilesystem(
	base afero.Fs,
	root string,
	cacheType string,
	ttl time.Duration,
	cacheDir string,
) (afero.Fs, error)

Types

type WriteCache

type WriteCache interface {
	io.Closer
	io.Reader
	io.Seeker
	io.Writer

	Truncate(size int64) error
	Size() (int64, error)
	Sync() error
}

func NewCacheWrite

func NewCacheWrite(
	root string,
	cacheType string,
) (cache WriteCache, cleanup func() error, err error)

Jump to

Keyboard shortcuts

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