Documentation
¶
Overview ¶
Package mcpregistrystatus provides status management and batched updates for MCPRegistry resources.
Package mcpregistrystatus provides status management for MCPRegistry resources.
Index ¶
- type Collector
- type StatusCollector
- func (s *StatusCollector) Apply(ctx context.Context, k8sClient client.Client) error
- func (s *StatusCollector) SetAPIReadyCondition(reason, message string, status metav1.ConditionStatus)
- func (s *StatusCollector) SetAPIStatus(phase mcpv1alpha1.APIPhase, message string, endpoint string)
- func (s *StatusCollector) SetMessage(message string)
- func (s *StatusCollector) SetPhase(phase mcpv1alpha1.MCPRegistryPhase)
- func (s *StatusCollector) SetSyncStatus(phase mcpv1alpha1.SyncPhase, message string, attemptCount int, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
// SetAPIReadyCondition sets the API ready condition with the specified reason, message, and status
SetAPIReadyCondition(reason, message string, status metav1.ConditionStatus)
// SetPhase sets the MCPRegistry phase in the status (overall phase)
SetPhase(phase mcpv1alpha1.MCPRegistryPhase)
// SetMessage sets the status message (overall message)
SetMessage(message string)
// SetSyncStatus sets the detailed sync status
SetSyncStatus(
phase mcpv1alpha1.SyncPhase, message string, attemptCount int,
lastSyncTime *metav1.Time, lastSyncHash string, serverCount int)
// SetAPIStatus sets the detailed API status
SetAPIStatus(phase mcpv1alpha1.APIPhase, message string, endpoint string)
// Apply applies all collected status changes in a single batch update
Apply(ctx context.Context, k8sClient client.Client) error
}
Collector defines the interface for collecting MCPRegistry status updates. It provides methods to collect status changes during reconciliation and apply them in a single batch update at the end.
func NewCollector ¶
func NewCollector(mcpRegistry *mcpv1alpha1.MCPRegistry) Collector
NewCollector creates a new status update collector for the given MCPRegistry resource.
type StatusCollector ¶
type StatusCollector struct {
// contains filtered or unexported fields
}
StatusCollector collects status changes during reconciliation and applies them in a single batch update at the end. It implements the Collector interface.
func (*StatusCollector) Apply ¶
Apply applies all collected status changes in a single batch update.
func (*StatusCollector) SetAPIReadyCondition ¶
func (s *StatusCollector) SetAPIReadyCondition(reason, message string, status metav1.ConditionStatus)
SetAPIReadyCondition adds or updates the API ready condition.
func (*StatusCollector) SetAPIStatus ¶
func (s *StatusCollector) SetAPIStatus(phase mcpv1alpha1.APIPhase, message string, endpoint string)
SetAPIStatus sets the detailed API status.
func (*StatusCollector) SetMessage ¶
func (s *StatusCollector) SetMessage(message string)
SetMessage sets the message to be updated.
func (*StatusCollector) SetPhase ¶
func (s *StatusCollector) SetPhase(phase mcpv1alpha1.MCPRegistryPhase)
SetPhase sets the phase to be updated.
func (*StatusCollector) SetSyncStatus ¶
func (s *StatusCollector) SetSyncStatus( phase mcpv1alpha1.SyncPhase, message string, attemptCount int, lastSyncTime *metav1.Time, lastSyncHash string, serverCount int)
SetSyncStatus sets the detailed sync status.