reconcile

package
v0.0.0-...-8262c23 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomReconciler

type CustomReconciler struct {
	*CustomReconcilerConfig
}

func (*CustomReconciler) Finalizer

func (r *CustomReconciler) Finalizer() Finalizer

func (*CustomReconciler) InjectDeps

func (r *CustomReconciler) InjectDeps(ctn deps.Container)

func (*CustomReconciler) Run

func (r *CustomReconciler) Run(originalCtx action.Context) (action.Result, error)

type CustomReconcilerConfig

type CustomReconcilerConfig struct {
	Name      string
	Reconcile CustomReconcilerFunc
	Finalize  Finalizer
}

func (*CustomReconcilerConfig) Validate

func (c *CustomReconcilerConfig) Validate() (bool, error)

type CustomReconcilerFunc

type CustomReconcilerFunc = action.ActionFn

type Finalizer

type Finalizer interface {
	Enabled(ctx action.Context) (bool, error)
	Finalize(ctx action.Context) (bool, action.Result, error)
}

type FinalizerSet

type FinalizerSet struct {
	// contains filtered or unexported fields
}

func CreateFinalizerSet

func CreateFinalizerSet(ctn interface{}, finalizers ...Finalizer) *FinalizerSet

func (*FinalizerSet) Run

func (s *FinalizerSet) Run(ctx action.Context) (action.Result, error)

type ListReconciler

type ListReconciler struct {
	*ListReconcilerConfig
	// contains filtered or unexported fields
}

func (*ListReconciler) Finalizer

func (r *ListReconciler) Finalizer() Finalizer

func (*ListReconciler) InjectDeps

func (d *ListReconciler) InjectDeps(ctn deps.Container)

func (*ListReconciler) OwnedGVK

func (r *ListReconciler) OwnedGVK() kotclient.GVK

func (*ListReconciler) Run

func (r *ListReconciler) Run(originalCtx action.Context) (action.Result, error)

type ListReconcilerConfig

type ListReconcilerConfig struct {
	GVK       kotclient.GVK
	If        ReconcileIfFunc
	Reconcile ReconcileListFunc
	Finalize  Finalizer
}

func (*ListReconcilerConfig) Validate

func (c *ListReconcilerConfig) Validate() (bool, error)

type OneReconciler

type OneReconciler struct {
	*OneReconcilerConfig
	// contains filtered or unexported fields
}

func (*OneReconciler) Finalizer

func (r *OneReconciler) Finalizer() Finalizer

func (*OneReconciler) InjectDeps

func (d *OneReconciler) InjectDeps(ctn deps.Container)

func (*OneReconciler) OwnedGVK

func (r *OneReconciler) OwnedGVK() kotclient.GVK

func (*OneReconciler) Run

func (r *OneReconciler) Run(originalCtx action.Context) (action.Result, error)

type OneReconcilerConfig

type OneReconcilerConfig struct {
	GVK       kotclient.GVK
	If        ReconcileIfFunc
	Reconcile ReconcileOneFunc
	Finalize  Finalizer
}

func (*OneReconcilerConfig) Validate

func (c *OneReconcilerConfig) Validate() (bool, error)

type ReconcileIfFunc

type ReconcileIfFunc func(ctx action.Context) (bool, error)

type ReconcileListFunc

type ReconcileListFunc func(ctx action.Context, childList runtimeclient.ObjectList) (action.Result, error)

type ReconcileOneFunc

type ReconcileOneFunc func(ctx action.Context, childObj runtimeclient.Object) (action.Result, error)

type Reconciler

type Reconciler interface {
	action.Action
	Finalizer() Finalizer
}

func CreateReconciler

func CreateReconciler(config ReconcilerConfig) (Reconciler, error)

func MustCreateReconciler

func MustCreateReconciler(config ReconcilerConfig) Reconciler

type ReconcilerConfig

type ReconcilerConfig interface {
	Validate() (bool, error)
}

type ResourceReconciler

type ResourceReconciler interface {
	Reconciler
	OwnedGVK() kotclient.GVK
	InjectDeps(ctn deps.Container)
}

type ResourceWatcher

type ResourceWatcher struct {
	*ResourceWatcherConfig
	// contains filtered or unexported fields
}

func (*ResourceWatcher) Handler

func (*ResourceWatcher) InjectDeps

func (w *ResourceWatcher) InjectDeps(ctn deps.Container)

func (*ResourceWatcher) Predicate

func (*ResourceWatcher) Source

func (w *ResourceWatcher) Source() runtimesource.Source

type ResourceWatcherConfig

type ResourceWatcherConfig struct {
	Watches runtimeclient.Object
	When    runtimepredicate.Predicate
	Enqueue func(deps deps.Container, obj runtimeclient.Object) ([]runtimereconcile.Request, error)
}

func (*ResourceWatcherConfig) Validate

func (c *ResourceWatcherConfig) Validate() (bool, error)

type StatusResolver

type StatusResolver = action.Action

type StatusUpdater

type StatusUpdater struct {
	// contains filtered or unexported fields
}

func CreateStatusUpdater

func CreateStatusUpdater(ctn interface{}, resolvers ...StatusResolver) *StatusUpdater

func (*StatusUpdater) Run

func (r *StatusUpdater) Run(ctx action.Context) (action.Result, error)

type Watcher

type Watcher interface {
	Source() runtimesource.Source
	Handler() runtimehandler.EventHandler
	Predicate() runtimepredicate.Predicate
}

func CreateWatcher

func CreateWatcher(config WatcherConfig) (Watcher, error)

func MustCreateWatcher

func MustCreateWatcher(config WatcherConfig) Watcher

type WatcherConfig

type WatcherConfig interface {
	Validate() (bool, error)
}

Jump to

Keyboard shortcuts

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