cache

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactCache

type ArtifactCache map[string]ImageDetails

ArtifactCache is a map of [artifact dependencies hash : ImageDetails]

type BuildAndTestFn added in v0.34.0

type BuildAndTestFn func(context.Context, io.Writer, tag.ImageTags, []*latest.Artifact) ([]build.Artifact, error)

type Cache

type Cache interface {
	Build(context.Context, io.Writer, tag.ImageTags, []*latest.Artifact, BuildAndTestFn) ([]build.Artifact, error)
}

func NewCache

func NewCache(cfg Config, imagesAreLocal bool, tryImportMissing bool, dependencies DependencyLister, graph build.ArtifactGraph, store build.ArtifactStore) (Cache, error)

NewCache returns the current state of the cache

type Config added in v1.7.1

type Config interface {
	docker.Config

	CacheArtifacts() bool
	CacheFile() string
	Mode() config.RunMode
}

type DependencyLister added in v0.34.0

type DependencyLister func(ctx context.Context, artifact *latest.Artifact) ([]string, error)

DependencyLister fetches a list of dependencies for an artifact

type ImageDetails

type ImageDetails struct {
	Digest string `yaml:"digest,omitempty"`
	ID     string `yaml:"id,omitempty"`
}

ImageDetails holds the Digest and ID of an image

Jump to

Keyboard shortcuts

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