utils

package
v0.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGitTrackCondition

GetGitTrackCondition returns the condition with the provided type.

func NewGitTrackCondition

func NewGitTrackCondition(condType farosv1alpha1.GitTrackConditionType, status v1.ConditionStatus, reason ConditionReason, message string) *farosv1alpha1.GitTrackCondition

NewGitTrackCondition creates a new GitTrack condition.

func RemoveGitTrackCondition

func RemoveGitTrackCondition(status *farosv1alpha1.GitTrackStatus, condType farosv1alpha1.GitTrackConditionType)

RemoveGitTrackCondition removes the GitTrack condition with the provided type.

func SetGitTrackCondition

func SetGitTrackCondition(status *farosv1alpha1.GitTrackStatus, condition farosv1alpha1.GitTrackCondition)

SetGitTrackCondition updates the GitTrack to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.

Types

type ConditionReason

type ConditionReason string

ConditionReason represents a valid condition reason

const (
	// StatusUnknown is the default ConditionReason for all conditions
	StatusUnknown ConditionReason = "StatusUnknown"

	// ErrorFetchingFiles represents the condition reason when an error occurs
	// fetching files from the repository
	ErrorFetchingFiles ConditionReason = "ErrorFetchingFiles"

	// GitFetchSuccess represents the condition reason when no error occurs
	// fecthing files from the repository
	GitFetchSuccess ConditionReason = "GitFetchSuccess"

	// ErrorParsingFiles represents the condition reason when an error occurs
	// parsing files from the repository
	ErrorParsingFiles ConditionReason = "ErrorParsingFiles"

	// FileParseSuccess represents the condition reason when no error occurs
	// parsing files from the repository
	FileParseSuccess ConditionReason = "FileParseSuccess"

	// ErrorUpdatingChildren represents the condition reason when an error occurs
	// updating the child objects
	ErrorUpdatingChildren ConditionReason = "ErrorUpdatingChildren"

	// ChildrenUpdateSuccess represents the condition reason when no error occurs
	// updating the child objects
	ChildrenUpdateSuccess ConditionReason = "ChildUpdateSuccess"

	// ErrorDeletingChildren represents the condition reason when an error occurs
	// removing orphaned children
	ErrorDeletingChildren ConditionReason = "ErrorDeletingChildren"

	// GCSuccess represents the condition reason when no error occurs
	// removing orphaned children
	GCSuccess ConditionReason = "GCSuccess"
)

Jump to

Keyboard shortcuts

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