Documentation
¶
Index ¶
- type Manager
- func (m *Manager) RegisterReconciler(resourceType string, reconciler Reconciler)
- func (m *Manager) RunReconcile(ctx context.Context, nsId string, resourceType string, resourceId string, ...) (any, error)
- func (m *Manager) RunReconcileAll(ctx context.Context, nsId string, resourceType string, maxConcurrent int) (model.ResourceReconcileResults, error)
- type Reconciler
- type VNetReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a singleton registry that holds and routes reconcile requests to appropriate Reconcilers.
func GetManager ¶
func GetManager() *Manager
GetManager returns the singleton instance of the Manager.
func (*Manager) RegisterReconciler ¶
func (m *Manager) RegisterReconciler(resourceType string, reconciler Reconciler)
RegisterReconciler registers a specific Reconciler for a given resourceType.
type Reconciler ¶
type Reconciler interface {
Reconcile(ctx context.Context, nsId string, resourceId string, optPreloadedStatus *model.CspResourceStatusResponse) (any, error)
ReconcileAll(ctx context.Context, nsId string, maxConcurrent int) (model.ResourceReconcileResults, error)
}
Reconciler is an interface that every resource-specific reconciler must implement.
type VNetReconciler ¶
type VNetReconciler struct{}
VNetReconciler implements the Reconciler interface for VNet resources.
func (*VNetReconciler) Reconcile ¶
func (r *VNetReconciler) Reconcile(ctx context.Context, nsId string, resourceId string, optPreloadedVNetStatus *model.CspResourceStatusResponse) (any, error)
Reconcile performs the state machine logic for VNet and delegates the actual sync to SyncVNetState.
func (*VNetReconciler) ReconcileAll ¶
func (r *VNetReconciler) ReconcileAll(ctx context.Context, nsId string, maxConcurrent int) (model.ResourceReconcileResults, error)
ReconcileAll reconciles all VNets in the namespace by comparing TB metadata with CSP state. This method batches reconciliation with optimized API calls (pre-fetch status per connection).