managed

package
v0.0.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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) Delete

func (c *NopApplogic) Delete(_ context.Context, _ resource.Managed) (bool, error)

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

func (c *NopApplogic) Initialize(_ context.Context, _ resource.Managed) error

func (*NopApplogic) Timeout

func (c *NopApplogic) Timeout(ctx context.Context, cr resource.Managed) time.Duration

func (*NopApplogic) Update

func (c *NopApplogic) Update(_ context.Context, _ resource.Managed) (map[string]string, error)

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.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile a managed resource with an external resource.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL