pipeline

package
v3.0.0-beta.20240418 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateResolver

type AggregateResolver []PipelineResolverFn

func NewAggregateResolver

func NewAggregateResolver(resolvers ...PipelineResolverFn) AggregateResolver

NewAggregateResolver creates an AggregregateResolver from a list of PipelineResolverFn, appending a final resolver for capturing the case that no resolvers find a pipeline

func (AggregateResolver) Resolve

func (pr AggregateResolver) Resolve() (*Pipeline, error)

Resolve is a PipelineResolverFn that wraps up a list of resolvers to loop through to try find a pipeline. The first pipeline that is found will be returned, if none are found if won't return an error to match the expectation of a PipelineResolveFn

type Pipeline

type Pipeline struct {
	Name string
	Org  string
}

Pipeline is a struct containing information about a pipeline for a resolver to return

type PipelineResolverFn

type PipelineResolverFn func() (*Pipeline, error)

PipelineResolverFn is a function for the purpose of finding a pipeline. It returns an error if an irrecoverable scenario happens and should halt execution. Otherwise if the resolver does not find a pipeline, it should return (nil, nil) to indicate this. ie. no error occurred, but no pipeline was found either.

Jump to

Keyboard shortcuts

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