Documentation
¶
Index ¶
- Variables
- func ComputeOperationType(meta metav1.ObjectMeta, lastOperation *gardencorev1alpha1.LastOperation) gardencorev1alpha1.LastOperationType
- func ConditionsNeedUpdate(existingConditions, newConditions []gardencorev1alpha1.Condition) bool
- func DetermineError(message string) error
- func ExtractErrorCodes(err error) []gardencorev1alpha1.ErrorCode
- func FormatLastErrDescription(err error) string
- func GetCondition(conditions []gardencorev1alpha1.Condition, ...) *gardencorev1alpha1.Condition
- func GetOrInitCondition(conditions []gardencorev1alpha1.Condition, ...) gardencorev1alpha1.Condition
- func InitCondition(conditionType gardencorev1alpha1.ConditionType) gardencorev1alpha1.Condition
- func IsControllerInstallationSuccessful(controllerInstallation gardencorev1alpha1.ControllerInstallation) bool
- func IsResourceSupported(resources []gardencorev1alpha1.ControllerResource, ...) bool
- func MergeConditions(oldConditions []gardencorev1alpha1.Condition, ...) []gardencorev1alpha1.Condition
- func NewConditions(conditions []gardencorev1alpha1.Condition, ...) []*gardencorev1alpha1.Condition
- func NewErrorWithCode(code gardencorev1alpha1.ErrorCode, message string) error
- func UpdatedCondition(condition gardencorev1alpha1.Condition, ...) gardencorev1alpha1.Condition
- func UpdatedConditionUnknownError(condition gardencorev1alpha1.Condition, err error) gardencorev1alpha1.Condition
- func UpdatedConditionUnknownErrorMessage(condition gardencorev1alpha1.Condition, message string) gardencorev1alpha1.Condition
- type Coder
Constants ¶
This section is empty.
Variables ¶
var Now = metav1.Now
Now determines the current metav1.Time.
Functions ¶
func ComputeOperationType ¶
func ComputeOperationType(meta metav1.ObjectMeta, lastOperation *gardencorev1alpha1.LastOperation) gardencorev1alpha1.LastOperationType
ComputeOperationType checksthe <lastOperation> and determines whether is it is Create operation or reconcile operation
func ConditionsNeedUpdate ¶
func ConditionsNeedUpdate(existingConditions, newConditions []gardencorev1alpha1.Condition) bool
ConditionsNeedUpdate returns true if the <existingConditions> must be updated based on <newConditions>.
func DetermineError ¶
DetermineError determines the Garden error code for the given error message.
func ExtractErrorCodes ¶
func ExtractErrorCodes(err error) []gardencorev1alpha1.ErrorCode
ExtractErrorCodes extracts all error codes from the given error by using utils.Errors
func FormatLastErrDescription ¶
FormatLastErrDescription formats the error message string for the last occurred error.
func GetCondition ¶
func GetCondition(conditions []gardencorev1alpha1.Condition, conditionType gardencorev1alpha1.ConditionType) *gardencorev1alpha1.Condition
GetCondition returns the condition with the given <conditionType> out of the list of <conditions>. In case the required type could not be found, it returns nil.
func GetOrInitCondition ¶
func GetOrInitCondition(conditions []gardencorev1alpha1.Condition, conditionType gardencorev1alpha1.ConditionType) gardencorev1alpha1.Condition
GetOrInitCondition tries to retrieve the condition with the given condition type from the given conditions. If the condition could not be found, it returns an initialized condition of the given type.
func InitCondition ¶
func InitCondition(conditionType gardencorev1alpha1.ConditionType) gardencorev1alpha1.Condition
InitCondition initializes a new Condition with an Unknown status.
func IsControllerInstallationSuccessful ¶
func IsControllerInstallationSuccessful(controllerInstallation gardencorev1alpha1.ControllerInstallation) bool
IsControllerInstallationSuccessful returns true if a ControllerInstallation has been marked as "successfully" installed.
func IsResourceSupported ¶
func IsResourceSupported(resources []gardencorev1alpha1.ControllerResource, resourceKind, resourceType string) bool
IsResourceSupported returns true if a given combination of kind/type is part of a controller resources list.
func MergeConditions ¶
func MergeConditions(oldConditions []gardencorev1alpha1.Condition, newConditions ...gardencorev1alpha1.Condition) []gardencorev1alpha1.Condition
MergeConditions merges the given <oldConditions> with the <newConditions>. Existing conditions are superseded by the <newConditions> (depending on the condition type).
func NewConditions ¶
func NewConditions(conditions []gardencorev1alpha1.Condition, conditionTypes ...gardencorev1alpha1.ConditionType) []*gardencorev1alpha1.Condition
NewConditions initializes the provided conditions based on an existing list. If a condition type does not exist in the list yet, it will be set to default values.
func NewErrorWithCode ¶
func NewErrorWithCode(code gardencorev1alpha1.ErrorCode, message string) error
NewErrorWithCode creates a new error that additionally exposes the given code via the Coder interface.
func UpdatedCondition ¶
func UpdatedCondition(condition gardencorev1alpha1.Condition, status gardencorev1alpha1.ConditionStatus, reason, message string) gardencorev1alpha1.Condition
UpdatedCondition updates the properties of one specific condition.
func UpdatedConditionUnknownError ¶
func UpdatedConditionUnknownError(condition gardencorev1alpha1.Condition, err error) gardencorev1alpha1.Condition
func UpdatedConditionUnknownErrorMessage ¶
func UpdatedConditionUnknownErrorMessage(condition gardencorev1alpha1.Condition, message string) gardencorev1alpha1.Condition
Types ¶
type Coder ¶
type Coder interface { error Code() gardencorev1alpha1.ErrorCode }
Coder is an error that may produce an ErrorCode visible to the outside.