corcache

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheSmokeTest

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

func CacheSystemTypes

func CacheSystemTypes(fs api.CacheSystem) api.CacheSystemType

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

func IntOptional

func IntOptional(i int) *int

func NewCacheSystem

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

NewCacheSystem initializes a CacheSystem of the given type

func RunTestCacheSystem

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

Types

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