resources

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceReconciler

type ResourceReconciler interface {
	// RefreshState reads the status of the external resource and updates the
	// internal Status resource on the API object.
	RefreshState(context.Context) error

	// Inspect the difference between Spec and current Status and update the
	// external resource as necessary (creating, updating or deleting it).
	EnsureState(context.Context) error

	// FinalizerName returns a base name of the finalizer for this reconciler
	// or nil if this reconciler doesn't do finalization
	FinalizerName() *string

	// DidWork indicates if the reconciler actually did any work in its
	// `EnsureState` method. The reconciler may determine that it has nothing
	// to do, e.g. if the external resource already matches the desired state,
	// in which case this will return false.
	DidWork() bool
}

ResourceReconciler can ensure an external resource matches desired state (Spec) and inspect the external resource and update internal representation (Status).

Note these should be request-scoped (new instances created per-request) in order to avoid state leaking between requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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