pipeline

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: BSD-3-Clause Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DeleteProtectionAnnotation = "syn.tools/protected-delete"
)

Variables

This section is empty.

Functions

func GetDefaultDeletionPolicy

func GetDefaultDeletionPolicy() synv1alpha1.DeletionPolicy

Types

type Context

type Context struct {
	Context       context.Context
	FinalizerName string
	Client        client.Client
	Log           logr.Logger
	Deleted       bool

	Reconciler            reconcile.Reconciler
	CreateSATokenSecret   bool
	DefaultCreationPolicy synv1alpha1.CreationPolicy
	// contains filtered or unexported fields
}

Context contains additional data about the CRD being processed.

type Function

type Function func(Object, *Context) Result

Function defines the general form of a pipeline function.

type Object

type Object interface {
	client.Object

	GetGitTemplate() *synv1alpha1.GitRepoTemplate
	GroupVersionKind() schema.GroupVersionKind
	GetTenantRef() corev1.LocalObjectReference
	GetDeletionPolicy() synv1alpha1.DeletionPolicy
	GetCreationPolicy() synv1alpha1.CreationPolicy
	GetDisplayName() string
	SetGitRepoURLAndHostKeys(URL, hostKeys string)
	GetMeta() metav1.ObjectMeta
	GetSpec() interface{}
	GetStatus() interface{}
}

Object defines an interface to extract necessary information from the CRs

type Result

type Result struct {
	Abort   bool
	Err     error
	Requeue bool
}

Result indicates whether the current execution should be aborted and if there was an error.

func AddTenantLabel

func AddTenantLabel(obj Object, _ *Context) Result

AddTenantLabel adds the tenant label to an object.

func CheckIfDeleted

func CheckIfDeleted(obj Object, data *Context) Result

func Common

func Common(obj Object, data *Context) Result

func DeepCopyOriginal

func DeepCopyOriginal(obj Object, data *Context) Result

func RunPipeline

func RunPipeline(obj Object, data *Context, steps []Step) Result

type Step

type Step struct {
	Name string
	F    Function
}

Jump to

Keyboard shortcuts

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