pipeline

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterVectorPipelines

func GetClusterVectorPipelines(ctx context.Context, client client.Client) ([]v1alpha1.ClusterVectorPipeline, error)

func GetPipelineHash

func GetPipelineHash(pipeline Pipeline) (*uint32, error)

func GetVectorPipelines

func GetVectorPipelines(ctx context.Context, client client.Client) ([]v1alpha1.VectorPipeline, error)

func IsPipelineChanged

func IsPipelineChanged(pipeline Pipeline) (bool, error)

IsPipelineChanged returns true, if hash in .status.lastAppliedPipelineHash matches with spec Hash

func MatchLabels

func MatchLabels(selector map[string]string, labels map[string]string) bool

func SetFailedStatus

func SetFailedStatus(ctx context.Context, client client.Client, p Pipeline, reason string) error

func SetSuccessStatus

func SetSuccessStatus(ctx context.Context, client client.Client, p Pipeline) error

Types

type FilterPipelines

type FilterPipelines struct {
	Scope     FilterScope
	Selector  *v1alpha1.VectorSelectorSpec
	Role      v1alpha1.VectorPipelineRole
	Namespace string
}

type FilterScope

type FilterScope int
const (
	AllPipelines       FilterScope = iota
	NamespacedPipeline FilterScope = iota
	ClusterPipelines   FilterScope = iota
)

type Pipeline

type Pipeline interface {
	client.Object
	GetSpec() v1alpha1.VectorPipelineSpec
	SetConfigCheck(bool)
	SetReason(*string)
	GetLastAppliedPipeline() *uint32
	SetLastAppliedPipeline(*uint32)
	GetConfigCheckResult() *bool
	IsValid() bool
	IsDeleted() bool
	UpdateStatus(context.Context, client.Client) error
	GetRole() v1alpha1.VectorPipelineRole
	SetRole(*v1alpha1.VectorPipelineRole)
	GetTypeMeta() v1.TypeMeta
}

func GetValidPipelines

func GetValidPipelines(ctx context.Context, client client.Client, filter FilterPipelines) ([]Pipeline, error)

Jump to

Keyboard shortcuts

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