reconstitution

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 *resource.Ref) (*resource.Resource, bool)
	PatchStatusAsync(ctx context.Context, req *ManifestRef, patchFn StatusPatchFn)
}

Client provides read/write access to a collection of reconstituted resources.

type CompositionRef

type CompositionRef struct {
	Name, Namespace string
	Generation      int64
}

CompositionRef refers to a specific generation of a composition.

func NewCompositionRef

func NewCompositionRef(comp *apiv1.Composition) *CompositionRef

type Manager

type Manager struct {
	ctrl.Manager
	// contains filtered or unexported fields
}

func New

func New(mgr ctrl.Manager, writeBatchInterval time.Duration) (*Manager, error)

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

func (r Manager) AddQueue(queue workqueue.Interface)

func (*Manager) GetClient

func (m *Manager) GetClient() Client

func (Manager) PatchStatusAsync

func (w Manager) PatchStatusAsync(ctx context.Context, ref *ManifestRef, patchFn StatusPatchFn)

func (Manager) Reconcile

func (r Manager) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (Manager) Start

func (w Manager) Start(ctx context.Context) error

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    resource.Ref
	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 = resource.Resource

type StatusPatchFn

type StatusPatchFn func(*apiv1.ResourceState) *apiv1.ResourceState

Jump to

Keyboard shortcuts

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