Documentation
¶
Index ¶
- Variables
- func HasAllLabels(labels map[string]string) containers.Option[PhaseOptions]
- func HasLabel(k, v string) containers.Option[PhaseOptions]
- func IsPhase(p Phase) containers.Option[PhaseOptions]
- func PromotesFrom[R Resource](c ResourcePhase[R]) containers.Option[AddPhaseOptions[R]]
- type AddPhaseOptions
- type Metadata
- type Phase
- type PhaseOptions
- type Pipeline
- type Resource
- type ResourcePhase
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when a particular resource cannot be located ErrNotFound = errors.New("not found") // ErrAlreadyExists is returned when an attempt is made to create a resource // which already exists ErrAlreadyExists = errors.New("already exists") )
Functions ¶
func HasAllLabels ¶
func HasAllLabels(labels map[string]string) containers.Option[PhaseOptions]
HasAllLabels causes a call to Phases to list any phase which mataches all the provided labels.
func HasLabel ¶
func HasLabel(k, v string) containers.Option[PhaseOptions]
HasLabel causes a call to Phases to list any phase with the matching label paid k and v.
func IsPhase ¶
func IsPhase(p Phase) containers.Option[PhaseOptions]
IsPhase causes a call to Phases to list specifically the provided phase p.
func PromotesFrom ¶
func PromotesFrom[R Resource](c ResourcePhase[R]) containers.Option[AddPhaseOptions[R]]
PromotesFrom configures a dependent Phase to promote from for the Phase being added.
Types ¶
type AddPhaseOptions ¶
type AddPhaseOptions[R Resource] struct { PromotedFrom ResourcePhase[R] }
AddPhaseOptions are used to configure the addition of a ResourcePhase to a Pipeline
type Metadata ¶
type Metadata struct { Name string `json:"name"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
Metadata contains the unique information used to identify a named resource instance in a particular phase.
type Phase ¶
type Phase interface { Metadata() Metadata Source() Metadata Get(context.Context) (Resource, error) Promote(context.Context) error }
Phase is the core interface for resource sourcing and management. These types can be registered on pipelines and can depend upon on another for promotion.
type PhaseOptions ¶
type PhaseOptions struct {
// contains filtered or unexported fields
}
PhaseOptions scopes a call to get phases from a pipeline.
func (*PhaseOptions) Matches ¶
func (p *PhaseOptions) Matches(phase Phase) bool
type Pipeline ¶
type Pipeline interface { Metadata() Metadata PhaseByName(string) (Phase, error) Phases(...containers.Option[PhaseOptions]) iter.Seq[Phase] Dependencies() map[Phase]Phase }
Pipeline is a collection of phases with potential promotion dependencies relationships between one another.