pipeline

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetDefaultDeletionPolicy added in v0.5.0

func GetDefaultDeletionPolicy() synv1alpha1.DeletionPolicy

Types

type Context added in v0.5.0

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

	Reconciler reconcile.Reconciler
	// 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 added in v0.5.0

type Object interface {
	GetObjectMeta() metav1.Object
	GetGitTemplate() *synv1alpha1.GitRepoTemplate
	GroupVersionKind() schema.GroupVersionKind
	GetTenantRef() corev1.LocalObjectReference
	GetDeletionPolicy() synv1alpha1.DeletionPolicy
	GetDisplayName() string
	SetGitRepoURLAndHostKeys(URL, hostKeys string)
	GetSpec() interface{}
	GetStatus() interface{}
}

Object defines an interface to extract necessary information from the CRs

type Result added in v0.5.0

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 added in v0.5.0

func AddTenantLabel(obj Object, data *Context) Result

AddTenantLabel adds the tenant label to an object.

func CheckIfDeleted added in v0.5.0

func CheckIfDeleted(obj Object, data *Context) Result

func Common added in v0.5.0

func Common(obj Object, data *Context) Result

func DeepCopyOriginal added in v0.5.0

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