reconcileresults

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: UPL-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConditionedStatusEquivalent

func ConditionedStatusEquivalent(left *oamrt.ConditionedStatus, right *oamrt.ConditionedStatus) bool

ConditionedStatusEquivalent determines if two conditioned status are equivalent. This is done by searching for all of the conditions from the left in the right. Then the conditions in the right are searched for in the left. False is returned at any point when a condition cannot be found. True is returned if all conditions in the left can be found in the right and vice versa.

func ConditionsEquivalent

func ConditionsEquivalent(left *oamrt.Condition, right *oamrt.Condition) bool

ConditionsEquivalent determines if two conditions are equivalent. The type, status, reason and message are compared to determine equivalence.

Types

type ReconcileResults

type ReconcileResults struct {
	Relations []v1alpha1.QualifiedResourceRelation
	Results   []controllerutil.OperationResult
	Errors    []error
}

ReconcileResults is used to collect the results of creating or updating child resources during reconciliation. The contained arrays are parallel arrays

func (*ReconcileResults) ContainsErrors

func (s *ReconcileResults) ContainsErrors() bool

ContainsErrors scans the errors to determine if any errors were recorded.

func (*ReconcileResults) ContainsRelation

func (s *ReconcileResults) ContainsRelation(relation v1alpha1.QualifiedResourceRelation) bool

ContainsRelation determines if the reconcile result contains the provided relation.

func (*ReconcileResults) ContainsUpdates

func (s *ReconcileResults) ContainsUpdates() bool

ContainsUpdates scans the updates to determine if any updates were recorded.

func (*ReconcileResults) CreateConditionedStatus

func (s *ReconcileResults) CreateConditionedStatus() oamrt.ConditionedStatus

CreateConditionedStatus creates conditioned status for use in object status. If no errors are found in the reconcile status a success condition is returned. Otherwise reconcile errors statuses are returned for the first error.

func (*ReconcileResults) CreateRelations

func (s *ReconcileResults) CreateRelations() []v1alpha1.QualifiedResourceRelation

CreateRelations creates a qualified resource relation slice for use in an object status.

func (*ReconcileResults) CreateResources

func (s *ReconcileResults) CreateResources() []oamrt.TypedReference

CreateResources creates a typed reference slice for use in an object status.

func (*ReconcileResults) RecordOutcome

RecordOutcome records the outcome of an operation during a reconcile.

func (*ReconcileResults) RecordOutcomeIfError

RecordOutcomeIfError records the outcome of an operation during a reconcile only the err is non-nil.

Jump to

Keyboard shortcuts

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