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, downloader network.Downloader, ) *restorer
NewRestorer creates a new cache restorer instance. `downloader` can be nil, unless you want to provide a custom `Downloader` implementation.
func NewSaver ¶
func NewSaver( envRepo env.Repository, logger log.Logger, pathProvider pathutil.PathProvider, pathModifier pathutil.PathModifier, pathChecker pathutil.PathChecker, uploader network.Uploader, ) *saver
NewSaver creates a new cache saver instance. `uploader` can be nil, unless you want to provide a custom `Uploader` implementation.
Types ¶
type RestoreCacheInput ¶
type RestoreCacheInput struct { // StepId identifies the exact cache step. Used for logging events. StepId string Verbose bool Keys []string NumFullRetries int }
RestoreCacheInput is the information that comes from the cache steps that call this shared implementation
type SaveCacheInput ¶
type SaveCacheInput struct { // StepId identifies the exact cache step. Used for logging events. StepId string Verbose bool Key string Paths []string // CompressionLevel is the zstd compression level used. Valid values are between 1 and 19. // If not provided (0), the default value (3) will be used. CompressionLevel int // CustomTarArgs is a list of custom arguments to pass to the tar command. These are appended to the default arguments. // Example: []string{"--format", "posix"} CustomTarArgs []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
Click to show internal directories.
Click to hide internal directories.