Documentation
¶
Index ¶
- type Client
- type CompositionRef
- type Manager
- func (m *Manager) Add(rec Reconciler) error
- func (r Manager) AddQueue(queue workqueue.Interface)
- func (m *Manager) GetClient() Client
- func (w Manager) PatchStatusAsync(ctx context.Context, ref *ManifestRef, patchFn StatusPatchFn)
- func (r Manager) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (w Manager) Start(ctx context.Context) error
- type ManifestRef
- type Reconciler
- type Request
- type Resource
- type ResourceRef
- type StatusPatchFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Get(ctx context.Context, comp *CompositionRef, res *ResourceRef) (*Resource, bool)
PatchStatusAsync(ctx context.Context, req *ManifestRef, patchFn StatusPatchFn)
}
Client provides read/write access to a collection of reconstituted resources.
type CompositionRef ¶
CompositionRef refers to a specific generation of a composition.
func NewCompositionRef ¶
func NewCompositionRef(comp *apiv1.Composition) *CompositionRef
type Manager ¶
func New ¶
New creates a new Manager, which is responsible for "reconstituting" resources i.e. allowing controllers to treat them as individual resources instead of their storage representation (ResourceSlice).
func (*Manager) Add ¶
func (m *Manager) Add(rec Reconciler) error
func (Manager) PatchStatusAsync ¶
func (w Manager) PatchStatusAsync(ctx context.Context, ref *ManifestRef, patchFn StatusPatchFn)
type ManifestRef ¶
type ManifestRef struct {
Slice types.NamespacedName
Index int // position of this manifest within the slice
}
ManifestRef references a particular resource manifest within a resource slice.
func (*ManifestRef) FindStatus ¶ added in v0.0.2
func (m *ManifestRef) FindStatus(slice *apiv1.ResourceSlice) *apiv1.ResourceState
type Reconciler ¶
type Reconciler interface {
Name() string
Reconcile(ctx context.Context, req *Request) (ctrl.Result, error)
}
Reconciler is implemented by types that can reconcile individual, reconstituted resources.
type Request ¶
type Request struct {
Resource ResourceRef
Manifest ManifestRef
Composition types.NamespacedName
}
Request is like controller-runtime reconcile.Request but for reconstituted resources. https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Request
type Resource ¶
type Resource struct {
Ref ResourceRef
Manifest *apiv1.Manifest
GVK schema.GroupVersionKind
SliceDeleted bool
ReadinessChecks readiness.Checks
// contains filtered or unexported fields
}
Resource is the controller's internal representation of a single resource out of a ResourceSlice.
func (*Resource) HasBeenSeen ¶
func (l *Resource) HasBeenSeen() bool
func (*Resource) MatchesLastSeen ¶
func (*Resource) ObserveReconciliation ¶
func (*Resource) ObserveVersion ¶
func (l *Resource) ObserveVersion(rv string)
func (*Resource) Parse ¶
func (r *Resource) Parse() (*unstructured.Unstructured, error)
type ResourceRef ¶
type ResourceRef struct {
Name, Namespace, Kind string
}
ResourceRef refers to a specific synthesized resource.
type StatusPatchFn ¶
type StatusPatchFn func(*apiv1.ResourceState) *apiv1.ResourceState