cache

package
v2.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 22 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRestorer

func NewRestorer(envRepo env.Repository, logger log.Logger, cmdFactory command.Factory) *restorer

NewRestorer ...

func NewSaver

func NewSaver(
	envRepo env.Repository,
	logger log.Logger,
	pathProvider pathutil.PathProvider,
	pathModifier pathutil.PathModifier,
	pathChecker pathutil.PathChecker,
) *saver

NewSaver ...

Types

type RestoreCacheInput

type RestoreCacheInput struct {
	// StepId identifies the exact cache step. Used for logging events.
	StepId  string
	Verbose bool
	Keys    []string
}

RestoreCacheInput is the information that comes from the cache steps that call this shared implementation

type Restorer

type Restorer interface {
	Restore(input RestoreCacheInput) error
}

Restorer ...

type SaveCacheInput

type SaveCacheInput struct {
	// StepId identifies the exact cache step. Used for logging events.
	StepId  string
	Verbose bool
	Key     string
	Paths   []string
	// IsKeyUnique indicates that the cache key is enough for knowing the cache archive is different from
	// another cache archive.
	// This can be set to true if the cache key contains a checksum that changes when any of the cached files change.
	// Example of such key: my-cache-key-{{ checksum "package-lock.json" }}
	// Example where this is not true: my-cache-key-{{ .OS }}-{{ .Arch }}
	IsKeyUnique bool
}

SaveCacheInput is the information that comes from the cache steps that call this shared implementation

type Saver

type Saver interface {
	Save(input SaveCacheInput) error
}

Saver ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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