cache

package
v0.19.7 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultDiskLookupKeySerializer

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

func (*DefaultDiskLookupKeySerializer) Serialize

func (s *DefaultDiskLookupKeySerializer) Serialize(key *version.Version) (string, error)

type ExecutionVersionCache

type ExecutionVersionCache interface {
	Get(key *version.Version) (string, error)
}

func NewExecutionVersionLayeredLoadingCache

func NewExecutionVersionLayeredLoadingCache(
	binaryName string,
	versionRootDir string,
	loader func(v *version.Version, destPath string) (models.FilePath, error),
) ExecutionVersionCache

type ExecutionVersionDiskLayer

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

ExecutionVersionDiskLayer is a cache layer which attempts to find the version on disk, before calling the configured loading function.

func (*ExecutionVersionDiskLayer) Get

func (v *ExecutionVersionDiskLayer) Get(key *version.Version) (string, error)

Gets a path from cache

type ExecutionVersionMemoryLayer

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

ExecutionVersionMemoryLayer is an in-memory cache which delegates to a disk layer if a version's path doesn't exist yet.

func (*ExecutionVersionMemoryLayer) Get

func (v *ExecutionVersionMemoryLayer) Get(key *version.Version) (string, error)

type KeySerializer

type KeySerializer interface {
	Serialize(key *version.Version) (string, error)
}

Directories

Path Synopsis
matchers
Code generated by pegomock.
Code generated by pegomock.

Jump to

Keyboard shortcuts

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