Documentation
¶
Overview ¶
Package virtualmcpserverstatus provides status management and batched updates for VirtualMCPServer resources.
Package virtualmcpserverstatus provides status management for VirtualMCPServer resources.
Index ¶
- type StatusCollector
- func (s *StatusCollector) SetAuthConfiguredCondition(reason, message string, status metav1.ConditionStatus)
- func (s *StatusCollector) SetCondition(conditionType, reason, message string, status metav1.ConditionStatus)
- func (s *StatusCollector) SetGroupRefValidatedCondition(reason, message string, status metav1.ConditionStatus)
- func (s *StatusCollector) SetMessage(message string)
- func (s *StatusCollector) SetObservedGeneration(generation int64)
- func (s *StatusCollector) SetPhase(phase mcpv1alpha1.VirtualMCPServerPhase)
- func (s *StatusCollector) SetReadyCondition(reason, message string, status metav1.ConditionStatus)
- func (s *StatusCollector) SetURL(url string)
- func (s *StatusCollector) UpdateStatus(ctx context.Context, vmcpStatus *mcpv1alpha1.VirtualMCPServerStatus) bool
- type StatusManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 StatusManager interface.
func (*StatusCollector) SetAuthConfiguredCondition ¶
func (s *StatusCollector) SetAuthConfiguredCondition(reason, message string, status metav1.ConditionStatus)
SetAuthConfiguredCondition sets the AuthConfigured condition.
func (*StatusCollector) SetCondition ¶
func (s *StatusCollector) SetCondition(conditionType, reason, message string, status metav1.ConditionStatus)
SetCondition sets a general condition with the specified type, reason, message, and status
func (*StatusCollector) SetGroupRefValidatedCondition ¶
func (s *StatusCollector) SetGroupRefValidatedCondition(reason, message string, status metav1.ConditionStatus)
SetGroupRefValidatedCondition sets the GroupRef validation condition.
func (*StatusCollector) SetMessage ¶
func (s *StatusCollector) SetMessage(message string)
SetMessage sets the message to be updated.
func (*StatusCollector) SetObservedGeneration ¶
func (s *StatusCollector) SetObservedGeneration(generation int64)
SetObservedGeneration sets the observed generation to be updated.
func (*StatusCollector) SetPhase ¶
func (s *StatusCollector) SetPhase(phase mcpv1alpha1.VirtualMCPServerPhase)
SetPhase sets the phase to be updated.
func (*StatusCollector) SetReadyCondition ¶
func (s *StatusCollector) SetReadyCondition(reason, message string, status metav1.ConditionStatus)
SetReadyCondition sets the Ready condition.
func (*StatusCollector) SetURL ¶
func (s *StatusCollector) SetURL(url string)
SetURL sets the service URL to be updated.
func (*StatusCollector) UpdateStatus ¶
func (s *StatusCollector) UpdateStatus(ctx context.Context, vmcpStatus *mcpv1alpha1.VirtualMCPServerStatus) bool
UpdateStatus applies all collected status changes in a single batch update. Expects vmcpStatus to be freshly fetched from the cluster to ensure the update operates on the latest resource version.
type StatusManager ¶
type StatusManager interface {
// SetPhase sets the VirtualMCPServer phase
SetPhase(phase mcpv1alpha1.VirtualMCPServerPhase)
// SetMessage sets the status message
SetMessage(message string)
// SetCondition sets a condition with the specified type, reason, message, and status
SetCondition(conditionType, reason, message string, status metav1.ConditionStatus)
// SetURL sets the service URL
SetURL(url string)
// SetObservedGeneration sets the observed generation
SetObservedGeneration(generation int64)
// SetGroupRefValidatedCondition sets the GroupRef validation condition
SetGroupRefValidatedCondition(reason, message string, status metav1.ConditionStatus)
// SetReadyCondition sets the Ready condition
SetReadyCondition(reason, message string, status metav1.ConditionStatus)
// SetAuthConfiguredCondition sets the AuthConfigured condition
SetAuthConfiguredCondition(reason, message string, status metav1.ConditionStatus)
// UpdateStatus applies all collected status changes in a single batch update.
// Returns true if updates were applied, false if no changes were collected.
UpdateStatus(ctx context.Context, vmcpStatus *mcpv1alpha1.VirtualMCPServerStatus) bool
}
StatusManager orchestrates all status updates for VirtualMCPServer resources. It collects status changes during reconciliation and applies them in a single batch update.
func NewStatusManager ¶
func NewStatusManager(vmcp *mcpv1alpha1.VirtualMCPServer) StatusManager
NewStatusManager creates a new StatusManager for the given VirtualMCPServer resource.