status

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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"

	// ConditionReasonManifestsApply indicates that nelm is applying manifests to the cluster
	ConditionReasonManifestsApply ConditionReason = "ManifestsApply"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Type    ConditionType          `json:"type"`
	Status  metav1.ConditionStatus `json:"status"` // true = condition met, false = condition failed
	Reason  ConditionReason        `json:"reason,omitempty"`
	Message string                 `json:"message,omitempty"`
}

Condition represents a single status condition for a package

type ConditionReason

type ConditionReason string

type ConditionType

type ConditionType string

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) SetConditionFalse added in v1.76.0

func (s *Service) SetConditionFalse(name string, condition ConditionType, reason, message string)

SetConditionFalse marks a condition as successful and notifies listeners if 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

func (*Service) UpdateSettings added in v1.76.0

func (s *Service) UpdateSettings(name string, settings addonutils.Values)

UpdateSettings stores the effective settings of a package. Does not notify — the caller pairs this with SetConditionTrue which notifies.

func (*Service) UpdateTracking added in v1.76.0

func (s *Service) UpdateTracking(name string, report progrep.ProgressReport)

UpdateTracking updates the nelm progress report for a package and notifies listeners. If the package is not tracked by the service, the update is silently ignored.

type Status

type Status struct {
	Version    string            `json:"version"`
	Conditions []Condition       `json:"conditions"`
	Tracking   Tracking          `json:"tracking"`
	Settings   addonutils.Values `json:"settings,omitempty"`
}

Status represents the current state of a package

type Tracking added in v1.76.0

type Tracking struct {
	Completed int                 `json:"completed"`
	Remaining int                 `json:"remaining"`
	Report    progrep.StageReport `json:"report"`
}

Jump to

Keyboard shortcuts

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