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 ¶
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).