corcache

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheSmokeTest

func CacheSmokeTest(t *testing.T, c api.CacheSystem)

func IntOptional

func IntOptional(i int) *int

func NewCacheSystem

func NewCacheSystem(fsType CacheSystemType) (api.CacheSystem, error)

NewCacheSystem initializes a CacheSystem of the given type

func RunTestCacheSystem

func RunTestCacheSystem(t *testing.T, c api.CacheSystem)

Types

type CacheSystemType

type CacheSystemType int

CacheSystemType is an identifier for supported FileSystems

const (
	NoCache CacheSystemType = iota
	Local
	Redis
	Olric
	EFS
)

Identifiers for supported FileSystemTypes

func CacheSystemTypes

func CacheSystemTypes(fs api.CacheSystem) CacheSystemType

CacheSystemTypes returns a CacheSystemType for a given CacheSystem pointer or the NoCache type.

type LocalCache

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

func NewLocalInMemoryProvider

func NewLocalInMemoryProvider(maxSize uint64) *LocalCache

func (*LocalCache) Check added in v0.1.5

func (l *LocalCache) Check() error

func (*LocalCache) Clear

func (l *LocalCache) Clear() error

func (*LocalCache) Delete

func (l *LocalCache) Delete(path string) error

func (*LocalCache) Deploy

func (l *LocalCache) Deploy() error

func (*LocalCache) Flush

func (l *LocalCache) Flush(fs api.FileSystem) error

func (*LocalCache) FunctionInjector

func (l *LocalCache) FunctionInjector() api.CacheConfigInjector

func (*LocalCache) Init

func (l *LocalCache) Init() error

func (*LocalCache) Join

func (l *LocalCache) Join(elem ...string) string

func (*LocalCache) ListFiles

func (l *LocalCache) ListFiles(path string) ([]api.FileInfo, error)

func (*LocalCache) OpenReader

func (l *LocalCache) OpenReader(path string, startAt int64) (io.ReadCloser, error)

func (*LocalCache) OpenWriter

func (l *LocalCache) OpenWriter(path string) (io.WriteCloser, error)

func (*LocalCache) Split

func (l *LocalCache) Split(path string) []string

func (*LocalCache) Stat

func (l *LocalCache) Stat(path string) (api.FileInfo, error)

func (*LocalCache) Undeploy

func (l *LocalCache) Undeploy() error

type WriteCloser

type WriteCloser struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func (*WriteCloser) Close

func (w *WriteCloser) Close() error

func (*WriteCloser) Write

func (w *WriteCloser) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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