cache

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 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

Jump to

Keyboard shortcuts

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