Documentation
¶
Overview ¶
Package trait provides a reconciler OAM traits.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoopModifier ¶
NoopModifier makes no modifications and returns no errors.
Types ¶
type Modifier ¶
A Modifier is responsible for modifying or adding objects to a workload translation.
func NewWorkloadModifierWithAccessor ¶
func NewWorkloadModifierWithAccessor(m ModifyFn, a ModifyAccessor) Modifier
NewWorkloadModifierWithAccessor is a modifier of a workload translation that uses an accessor.
type ModifyAccessor ¶
A ModifyAccessor obtains the object to be modified from a wrapping object.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
A Reconciler reconciles OAM traits by modifying the object that a workload has been translated into.
func NewReconciler ¶
func NewReconciler(m ctrl.Manager, trait resource.TraitKind, trans resource.ObjectKind, o ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler that reconciles OAM traits by fetching their referenced workload's translation and applying modifications.
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
A ReconcilerOption configures a Reconciler.
func WithApplicator ¶
func WithApplicator(a resource.Applicator) ReconcilerOption
WithApplicator specifies how the Reconciler should apply the workload translation modification.
func WithLogger ¶
func WithLogger(l logging.Logger) ReconcilerOption
WithLogger specifies how the Reconciler should log messages.
func WithModifier ¶
func WithModifier(m Modifier) ReconcilerOption
WithModifier specifies how the Reconciler should modify the workload translation.
func WithRecorder ¶
func WithRecorder(er event.Recorder) ReconcilerOption
WithRecorder specifies how the Reconciler should record events.
type WorkloadModifier ¶
type WorkloadModifier struct {
ModifyFn
}
WorkloadModifier is a concrete implementation of a Modifier.