status

package
v1.75.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type Error struct {
	Err        error
	Conditions []Condition
}

Error wraps an error with associated status conditions Used to propagate both error details and status updates through the call stack

func (*Error) Error

func (e *Error) Error() string

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

func (s *Service) ClearRuntimeConditions(name string)

ClearRuntimeConditions sets runtime conditions to unknown

func (*Service) Delete

func (s *Service) Delete(name string)

Delete removes a package status from tracking Should be called when a package is deleted to prevent memory leaks

func (*Service) GetCh

func (s *Service) GetCh() <-chan string

GetCh returns a read-only channel that receives package names when their status changes

func (*Service) GetStatus

func (s *Service) GetStatus(name string) Status

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

func (s *Service) HandleError(name string, err error)

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

func (s *Service) SetVersion(name string, version string)

SetVersion sets the current version of package

type Status

type Status struct {
	Version    string      `json:"version"`
	Conditions []Condition `json:"conditions" yaml:"conditions"`
}

Status represents the current state of a package

Jump to

Keyboard shortcuts

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