Documentation
¶
Index ¶
- type Condition
- type ConditionReason
- type ConditionType
- type Error
- type Service
- func (s *Service) ClearRuntimeConditions(name string)
- func (s *Service) Delete(name string)
- func (s *Service) GetCh() <-chan string
- func (s *Service) GetStatus(name string) Status
- func (s *Service) HandleError(name string, err error)
- func (s *Service) SetConditionTrue(name string, condition ConditionType)
- func (s *Service) SetVersion(name string, version string)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
Type ConditionType `json:"type" yaml:"type"`
Status metav1.ConditionStatus `json:"status" yaml:"status"` // true = condition met, false = condition failed
Reason ConditionReason `json:"reason,omitempty" yaml:"reason,omitempty"`
Message string `json:"message,omitempty" yaml:"message,omitempty"`
}
Condition represents a single status condition for a package
type ConditionReason ¶
type ConditionReason string
type ConditionType ¶
type ConditionType string
const ( // ConditionRequirementsMet indicates package requirements validation passed ConditionRequirementsMet ConditionType = "RequirementsMet" // ConditionDownloaded indicates package image was successfully downloaded from registry ConditionDownloaded ConditionType = "Downloaded" // ConditionReadyOnFilesystem indicates package was successfully mounted and accessible ConditionReadyOnFilesystem ConditionType = "ReadyOnFilesystem" // ConditionReadyInRuntime indicates package is fully loaded and operational in runtime ConditionReadyInRuntime ConditionType = "ReadyInRuntime" // ConditionHooksProcessed indicates all package hooks executed successfully ConditionHooksProcessed ConditionType = "HooksProcessed" // ConditionHelmApplied indicates Helm release was successfully applied ConditionHelmApplied ConditionType = "HelmApplied" // ConditionReadyInCluster checks the resources are ready ConditionReadyInCluster ConditionType = "ReadyInCluster" // ConditionSettingsValid checks the settings passed openAPI validation ConditionSettingsValid ConditionType = "SettingsValid" // ConditionWaitConverge indicates that the package wait converge ConditionWaitConverge ConditionType = "WaitConverge" )
type Error ¶
Error wraps an error with associated status conditions Used to propagate both error details and status updates through the call stack
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service tracks package statuses and notifies listeners of changes
func NewService ¶
func NewService() *Service
func (*Service) ClearRuntimeConditions ¶
ClearRuntimeConditions sets runtime conditions to unknown
func (*Service) Delete ¶
Delete removes a package status from tracking Should be called when a package is deleted to prevent memory leaks
func (*Service) GetCh ¶
GetCh returns a read-only channel that receives package names when their status changes
func (*Service) GetStatus ¶
GetStatus retrieves a copy of the current status for a package by name ("namespace.name") Returns a copy to prevent race conditions with concurrent modifications
func (*Service) HandleError ¶
HandleError processes an error and extracts status conditions from it Notifies listeners if any conditions changed
func (*Service) SetConditionTrue ¶
func (s *Service) SetConditionTrue(name string, condition ConditionType)
SetConditionTrue marks a condition as successful and notifies listeners if changed
func (*Service) SetVersion ¶
SetVersion sets the current version of package