Documentation ¶
Overview ¶
Package summary provides a summary of a bundle's, gitrepo's or cluster's state.
Index ¶
- func GetDeploymentState(bundleDeployment *fleet.BundleDeployment) fleet.BundleState
- func GetSummaryState(summary fleet.BundleSummary) fleet.BundleState
- func Increment(left *fleet.BundleSummary, right fleet.BundleSummary)
- func IncrementResourceCounts(left *fleet.GitRepoResourceCounts, right fleet.GitRepoResourceCounts)
- func IncrementState(summary *fleet.BundleSummary, name string, state fleet.BundleState, ...)
- func IsReady(summary fleet.BundleSummary) bool
- func MessageFromCondition(conditionType string, conds []genericcondition.GenericCondition) string
- func MessageFromDeployment(deployment *fleet.BundleDeployment) string
- func ReadyMessage(summary fleet.BundleSummary, referencedKind string) string
- func SetReadyConditions(obj interface{}, referencedKind string, summary fleet.BundleSummary)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeploymentState ¶
func GetDeploymentState(bundleDeployment *fleet.BundleDeployment) fleet.BundleState
GetDeploymentState calculates a fleet.BundleState from bundleDeployment (pure function)
func GetSummaryState ¶
func GetSummaryState(summary fleet.BundleSummary) fleet.BundleState
GetSummaryState returns the summary state of a bundle. The returned value is empty if the bundle has no non-ready resources.
func Increment ¶
func Increment(left *fleet.BundleSummary, right fleet.BundleSummary)
func IncrementResourceCounts ¶
func IncrementResourceCounts(left *fleet.GitRepoResourceCounts, right fleet.GitRepoResourceCounts)
func IncrementState ¶
func IncrementState(summary *fleet.BundleSummary, name string, state fleet.BundleState, message string, modified []fleet.ModifiedStatus, nonReady []fleet.NonReadyStatus)
IncrementState increments counters in the BundleSummary. We store up to 10 non ready resources in the summary, with the bundldedeployment's state.
func IsReady ¶
func IsReady(summary fleet.BundleSummary) bool
func MessageFromCondition ¶
func MessageFromCondition(conditionType string, conds []genericcondition.GenericCondition) string
func MessageFromDeployment ¶
func MessageFromDeployment(deployment *fleet.BundleDeployment) string
MessageFromDeployment returns a relevant message from the deployment conditions (pure function)
func ReadyMessage ¶
func ReadyMessage(summary fleet.BundleSummary, referencedKind string) string
func SetReadyConditions ¶
func SetReadyConditions(obj interface{}, referencedKind string, summary fleet.BundleSummary)
SetReadyConditions expects a status object as obj and updates its ready conditions according to summary as per ReadyMessage
Types ¶
This section is empty.