build

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactName

type ArtifactName string

ArtifactName is just a string, with its own type to make interfaces using it more self-documenting.

type RegisterableArtifact

type RegisterableArtifact interface {
	runtime.Artifact
}

A RegisterableArtifact is an Artifact which can be added to the registry

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository is the mapping from a ArtifactName to an Artifact. Steps will both populate this map with new artifacts (e.g. the resource fetched by a Get step), and look up required artifacts (e.g. the inputs configured for a Task step).

There is only one ArtifactRepository for the duration of a build plan's execution.

func NewRepository

func NewRepository() *Repository

NewArtifactRepository constructs a new repository.

func (*Repository) ArtifactFor

func (repo *Repository) ArtifactFor(name ArtifactName) (runtime.Artifact, bool)

SourceFor looks up a Source for the given ArtifactName. Consumers of artifacts, e.g. the Task step, will call this to locate their dependencies.

func (*Repository) AsMap

func (repo *Repository) AsMap() map[ArtifactName]runtime.Artifact

AsMap extracts the current contents of the ArtifactRepository into a new map and returns it. Changes to the returned map or the ArtifactRepository will not affect each other.

func (*Repository) RegisterArtifact

func (repo *Repository) RegisterArtifact(name ArtifactName, artifact RegisterableArtifact)

RegisterArtifact inserts an RegisterableArtifact into the map under the given ArtifactName. Producers of artifacts, e.g. the Get step and the Task step, will call this after they've successfully produced their artifact(s).

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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