graph

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ImageName string `json:"imageName"`
	Tag       string `json:"tag"`
}

Artifact is the result corresponding to each successful build.

type ArtifactGraph

type ArtifactGraph map[string]*latestV1.Artifact

ArtifactGraph is a map of [artifact image : artifact definition]

func ToArtifactGraph

func ToArtifactGraph(artifacts []*latestV1.Artifact) ArtifactGraph

ToArtifactGraph creates an instance of `ArtifactGraph` from `[]*latestV1.Artifact`

func (ArtifactGraph) Dependencies

func (g ArtifactGraph) Dependencies(a *latestV1.Artifact) []*latestV1.Artifact

Dependencies returns the de-referenced slice of required artifacts for a given artifact

type SourceDependenciesCache added in v1.24.0

type SourceDependenciesCache interface {
	// TransitiveArtifactDependencies returns the source dependencies for the target artifact, including the source dependencies from all other artifacts that are in the transitive closure of its artifact dependencies.
	// The result (even if an error) is cached so that the function is evaluated only once for every artifact. The cache is reset before the start of the next devloop.
	TransitiveArtifactDependencies(ctx context.Context, a *latestV1.Artifact) ([]string, error)
	// SingleArtifactDependencies returns the source dependencies for only the target artifact.
	// The result (even if an error) is cached so that the function is evaluated only once for every artifact. The cache is reset before the start of the next devloop.
	SingleArtifactDependencies(ctx context.Context, a *latestV1.Artifact) ([]string, error)
	// Reset removes the cached source dependencies for all artifacts
	Reset()
}

SourceDependenciesCache provides an interface to evaluate and cache the source dependencies for artifacts.

func NewSourceDependenciesCache added in v1.24.0

func NewSourceDependenciesCache(cfg docker.Config, r docker.ArtifactResolver, g ArtifactGraph) SourceDependenciesCache

Jump to

Keyboard shortcuts

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