Documentation
¶
Index ¶
- func BoltLogger[R glu.Resource](name string) func(Builder[R]) (typed.PhaseLogger[R], error)
- func GitPhase[R srcgit.Resource](meta glu.Metadata, srcName string, opts ...containers.Option[srcgit.Phase[R]]) func(Builder[R]) (typed.UpdatablePhase[R], error)
- func OCIPhase[R srcoci.Resource](meta glu.Metadata, srcName string, opts ...containers.Option[srcoci.Phase[R]]) func(Builder[R]) (typed.Phase[R], error)
- type Builder
- type PhaseBuilder
- type PipelineBuilder
- func (b *PipelineBuilder[R]) Build() error
- func (p *PipelineBuilder[R]) Configuration() *glu.Config
- func (p *PipelineBuilder[R]) Context() context.Context
- func (p *PipelineBuilder[R]) Logger() typed.PhaseLogger[R]
- func (b *PipelineBuilder[R]) LogsTo(fn func(b Builder[R]) (typed.PhaseLogger[R], error)) *PipelineBuilder[R]
- func (p *PipelineBuilder[R]) New() R
- func (b *PipelineBuilder[R]) NewPhase(fn func(b Builder[R]) (typed.Phase[R], error)) (next *PhaseBuilder[R])
- func (p *PipelineBuilder[R]) PipelineName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoltLogger ¶
BoltLogger returns an instance of type.PhaseLogger which writes to a boltdb file as configured by the provided name.
Types ¶
type Builder ¶
type Builder[R glu.Resource] interface { New() R Context() context.Context PipelineName() string Configuration() *glu.Config Logger() typed.PhaseLogger[R] }
Builder is used carry dependencies for building new phases
type PhaseBuilder ¶
type PhaseBuilder[R glu.Resource] struct { *PipelineBuilder[R] // contains filtered or unexported fields }
PhaseBuilder is used to chain building new phases with edges leading to the same phase.
func (*PhaseBuilder[R]) PromotesTo ¶
func (b *PhaseBuilder[R]) PromotesTo(fn func(b Builder[R]) (typed.UpdatablePhase[R], error), ts ...triggers.Trigger) (next *PhaseBuilder[R])
PromotesTo creates a new phase and an edge to this new phase from the phase built in the receiver.
type PipelineBuilder ¶
PipelineBuilder is a utility type for populating systems with type constrained pipelines. It has a number of utilities for simplifying common configuration options used to create types sources and phases within a typed pipeline.
func NewBuilder ¶
func NewBuilder[R glu.Resource](system *glu.System, meta glu.Metadata, newFn func() R, opts ...containers.Option[PipelineBuilder[R]]) *PipelineBuilder[R]
NewBuilder constructs and configures a new pipeline builder.
func (*PipelineBuilder[R]) Build ¶
func (b *PipelineBuilder[R]) Build() error
func (*PipelineBuilder[R]) Configuration ¶
func (p *PipelineBuilder[R]) Configuration() *glu.Config
func (*PipelineBuilder[R]) Context ¶
func (p *PipelineBuilder[R]) Context() context.Context
func (*PipelineBuilder[R]) Logger ¶
func (p *PipelineBuilder[R]) Logger() typed.PhaseLogger[R]
func (*PipelineBuilder[R]) LogsTo ¶
func (b *PipelineBuilder[R]) LogsTo(fn func(b Builder[R]) (typed.PhaseLogger[R], error)) *PipelineBuilder[R]
LogsTo invokes provided function to build a new logger which is then used throughout the rest of the pipeline.
func (*PipelineBuilder[R]) New ¶
func (p *PipelineBuilder[R]) New() R
func (*PipelineBuilder[R]) NewPhase ¶
func (b *PipelineBuilder[R]) NewPhase(fn func(b Builder[R]) (typed.Phase[R], error)) (next *PhaseBuilder[R])
NewPhase constructs a new phase and registers it on the resulting pipeline produced by the builder.
func (*PipelineBuilder[R]) PipelineName ¶
func (p *PipelineBuilder[R]) PipelineName() string