Documentation ¶
Index ¶
- Constants
- Variables
- func CondStr(ci interface{}) string
- type StrategyConditionsMap
- func (sc StrategyConditionsMap) AllTrue(step int32) bool
- func (sc StrategyConditionsMap) AsReleaseStrategyConditions() []shipper.ReleaseStrategyCondition
- func (sc StrategyConditionsMap) AsReleaseStrategyState(step int32, hasIncumbent bool, isLastStep bool) shipper.ReleaseStrategyState
- func (sc StrategyConditionsMap) GetCondition(conditionType shipper.StrategyConditionType) (shipper.ReleaseStrategyCondition, bool)
- func (sc StrategyConditionsMap) GetStatus(conditionType shipper.StrategyConditionType) (corev1.ConditionStatus, bool)
- func (sc StrategyConditionsMap) IsFalse(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsNotTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) IsUnknown(step int32, conditionTypes ...shipper.StrategyConditionType) bool
- func (sc StrategyConditionsMap) Merge(other StrategyConditionsMap)
- func (sc StrategyConditionsMap) Set(conditions ...shipper.ReleaseStrategyCondition)
- func (sc StrategyConditionsMap) SetFalse(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- func (sc StrategyConditionsMap) SetTrue(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- func (sc StrategyConditionsMap) SetUnknown(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
- type StrategyConditionsUpdate
Constants ¶
const ( ServerError = "ServerError" TargetClusterClientError = "TargetClusterClientError" CreateReleaseFailed = "CreateReleaseFailed" ChartVersionResolutionFailed = "ChartVersionResolutionFailed" BrokenReleaseGeneration = "BrokenReleaseGeneration" BrokenApplicationObservedGeneration = "BrokenApplicationObservedGeneration" StrategyExecutionFailed = "StrategyExecutionFailed" )
Variables ¶
var StrategyConditionsShouldDiscardTimestamps = false
StrategyConditionsShouldDiscardTimestamps can be used to skip timestamps in condition transitions in tests.
Functions ¶
Types ¶
type StrategyConditionsMap ¶
type StrategyConditionsMap map[shipper.StrategyConditionType]shipper.ReleaseStrategyCondition
StrategyConditionsMap is used to manage a list of ReleaseStrategyConditions.
func NewStrategyConditions ¶
func NewStrategyConditions(conditions ...shipper.ReleaseStrategyCondition) StrategyConditionsMap
NewStrategyConditions returns a new StrategyConditionsMap object with the given list of ReleaseStrategyConditions.
func (StrategyConditionsMap) AllTrue ¶
func (sc StrategyConditionsMap) AllTrue(step int32) bool
AllTrue returns true if all the existing conditions in the receiver have their status True.
func (StrategyConditionsMap) AsReleaseStrategyConditions ¶
func (sc StrategyConditionsMap) AsReleaseStrategyConditions() []shipper.ReleaseStrategyCondition
AsReleaseStrategyConditions returns an ordered list of v1.ReleaseStrategyCondition values. This list is sorted by ReleaseStrategyCondition type.
func (StrategyConditionsMap) AsReleaseStrategyState ¶
func (sc StrategyConditionsMap) AsReleaseStrategyState( step int32, hasIncumbent bool, isLastStep bool, ) shipper.ReleaseStrategyState
AsReleaseStrategyState returns a ReleaseStrategyState computed from the conditions in the receiver.
func (StrategyConditionsMap) GetCondition ¶
func (sc StrategyConditionsMap) GetCondition(conditionType shipper.StrategyConditionType) (shipper.ReleaseStrategyCondition, bool)
func (StrategyConditionsMap) GetStatus ¶
func (sc StrategyConditionsMap) GetStatus(conditionType shipper.StrategyConditionType) (corev1.ConditionStatus, bool)
GetStatus returns the status of condition from the receiver.
func (StrategyConditionsMap) IsFalse ¶
func (sc StrategyConditionsMap) IsFalse(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsFalse returns true if all the given conditions have their status False in the receiver.
func (StrategyConditionsMap) IsNotTrue ¶
func (sc StrategyConditionsMap) IsNotTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
func (StrategyConditionsMap) IsTrue ¶
func (sc StrategyConditionsMap) IsTrue(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsTrue returns true if all the given conditions have their status True in the receiver.
func (StrategyConditionsMap) IsUnknown ¶
func (sc StrategyConditionsMap) IsUnknown(step int32, conditionTypes ...shipper.StrategyConditionType) bool
IsUnknown returns true if all the given conditions have their status Unknown in the receiver.
func (StrategyConditionsMap) Merge ¶
func (sc StrategyConditionsMap) Merge(other StrategyConditionsMap)
Merge merges another StrategyConditionsMap object into the receiver. Conditions from "other" can override existing conditions in the receiver.
func (StrategyConditionsMap) Set ¶
func (sc StrategyConditionsMap) Set(conditions ...shipper.ReleaseStrategyCondition)
Set adds conditions to the receiver. Added conditions can override existing conditions in the receiver.
func (StrategyConditionsMap) SetFalse ¶
func (sc StrategyConditionsMap) SetFalse(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetFalse transitions an existing condition from its current status to False.
func (StrategyConditionsMap) SetTrue ¶
func (sc StrategyConditionsMap) SetTrue(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetTrue transitions an existing condition from its current status to True.
func (StrategyConditionsMap) SetUnknown ¶
func (sc StrategyConditionsMap) SetUnknown(conditionType shipper.StrategyConditionType, update StrategyConditionsUpdate)
SetUnknown transitions an existing condition from its current status to Unknown.