Documentation ¶
Index ¶
- type Applogic
- type NopApplogic
- func (c *NopApplogic) Delete(_ context.Context, _ resource.Managed) (bool, error)
- func (c *NopApplogic) FinalDelete(ctx context.Context, cr resource.Managed)
- func (c *NopApplogic) FinalUpdate(_ context.Context, _ resource.Managed)
- func (c *NopApplogic) Initialize(_ context.Context, _ resource.Managed) error
- func (c *NopApplogic) Timeout(ctx context.Context, cr resource.Managed) time.Duration
- func (c *NopApplogic) Update(_ context.Context, _ resource.Managed) (map[string]string, error)
- type Reconciler
- type ReconcilerOption
- func WithApplogic(a Applogic) ReconcilerOption
- func WithFinalizer(f resource.Finalizer) ReconcilerOption
- func WithLogger(l logging.Logger) ReconcilerOption
- func WithPollInterval(after time.Duration) ReconcilerOption
- func WithRecorder(er event.Recorder) ReconcilerOption
- func WithSpeedy(s map[string]int) ReconcilerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applogic ¶
type Applogic interface { Initialize(ctx context.Context, mr resource.Managed) error Update(ctx context.Context, mr resource.Managed) (map[string]string, error) FinalUpdate(ctx context.Context, mr resource.Managed) Timeout(ctx context.Context, mr resource.Managed) time.Duration Delete(ctx context.Context, mr resource.Managed) (bool, error) FinalDelete(ctx context.Context, mr resource.Managed) }
type NopApplogic ¶
type NopApplogic struct{}
A NopApplogic does nothing.
func (*NopApplogic) FinalDelete ¶
func (c *NopApplogic) FinalDelete(ctx context.Context, cr resource.Managed)
func (*NopApplogic) FinalUpdate ¶
func (c *NopApplogic) FinalUpdate(_ context.Context, _ resource.Managed)
func (*NopApplogic) Initialize ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
A Reconciler reconciles app resources by creating and managing the lifecycle
func NewReconciler ¶
func NewReconciler(m manager.Manager, of resource.ManagedKind, o ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler that reconciles managed resources of the supplied ManagedKind. It panics if asked to reconcile a managed resource kind that is not registered with the supplied manager's runtime.Scheme. The returned Reconciler reconciles with a dummy, no-op 'external system' by default; callers should supply an ExternalConnector that returns an ExternalClient capable of managing resources in a real system.
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
A ReconcilerOption configures a Reconciler.
func WithApplogic ¶
func WithApplogic(a Applogic) ReconcilerOption
WithApplication specifies how the Reconciler should connect to the application logic
func WithFinalizer ¶
func WithFinalizer(f resource.Finalizer) ReconcilerOption
WithFinalizer specifies how the Reconciler should add and remove finalizers to and from the managed resource.
func WithLogger ¶
func WithLogger(l logging.Logger) ReconcilerOption
WithLogger specifies how the Reconciler should log messages.
func WithPollInterval ¶
func WithPollInterval(after time.Duration) ReconcilerOption
WithPollInterval specifies how long the Reconciler should wait before queueing a new reconciliation after a successful reconcile. The Reconciler requeues after a specified duration when it is not actively waiting for an external operation, but wishes to check whether an existing external resource needs to be synced to its ndd Managed resource.
func WithRecorder ¶
func WithRecorder(er event.Recorder) ReconcilerOption
WithRecorder specifies how the Reconciler should record events.
func WithSpeedy ¶
func WithSpeedy(s map[string]int) ReconcilerOption