Documentation
¶
Index ¶
- Constants
- type Manager
- func (m *Manager) ReconcileRequired(obj client.Object) bool
- func (m *Manager) RemoveRefreshLabel(obj client.Object) bool
- func (m *Manager) RequeueDelay(obj client.Object) time.Duration
- func (m *Manager) SetNextReconcileTime(obj client.Object)
- func (m *Manager) UpdateObservedGeneration(obj client.Object)
- type Option
- type SpreadReconcileStatus
Constants ¶
const (
// RefreshLabel triggers an immediate reconciliation when present.
RefreshLabel = "platform-mesh.io/refresh-reconcile"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements reconciliation spreading to avoid thundering-herd effects.
func NewManager ¶
NewManager creates a new spread Manager with the given options. Panics if minDuration > maxDuration after applying options.
func (*Manager) ReconcileRequired ¶
ReconcileRequired returns true if the object should be reconciled now.
func (*Manager) RemoveRefreshLabel ¶
RemoveRefreshLabel removes the refresh label and returns true if it was present.
func (*Manager) RequeueDelay ¶
RequeueDelay returns the remaining time until the next scheduled reconciliation.
func (*Manager) SetNextReconcileTime ¶
SetNextReconcileTime sets a random next reconcile time within the configured range.
func (*Manager) UpdateObservedGeneration ¶
UpdateObservedGeneration sets the observed generation to the current generation.
type Option ¶
type Option func(*Manager)
Option configures the spread Manager.
func WithMaxDuration ¶
WithMaxDuration sets the maximum spread duration.
func WithMinDuration ¶
WithMinDuration sets the minimum spread duration.