refs

package
v0.0.0-...-886f955 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventMapping

type EventMapping map[GVK]map[types.NamespacedName]*SubscriptionNode

type GVK

type GVK struct {
	Group   string
	Version string
	Kind    string
}

TODO: can we get rid of this in exchange for schema.GroupVersionKind?

func GVKFromClientObject

func GVKFromClientObject(obj client.Object) GVK

func (*GVK) ToClientObject

func (g *GVK) ToClientObject() client.Object

type QueueContext

type QueueContext struct {
	// Context    context.Context
	Req        ctrl.Request
	Reconciler reconcile.Reconciler
}

TODO: when a queue object is exposed, use that instead.

type RefManager

type RefManager struct {
	// EventMapping
	EventMapping EventMapping
	// SubscriptionsByReferrer is a map of QueueContexts to a LinkedList
	// of subscriptions owned by that QueueContext.
	//
	// This is used internally for efficient cleanup of subscriptions.
	SubscriptionsByReferrer map[QueueContext]*SubscriptionNode
	Manager                 ctrl.Manager

	// SubscriptionsPerGVK counts the number of subscriptions per
	// GVK, and when the value is zero, removes the controller.
	SubscriptionsPerGVK map[GVK]int
	// contains filtered or unexported fields
}

RefManager is an auxiliary manager for triggering reconciles sooner for objects references, when those referents change.

func NewRefManager

func NewRefManager() RefManager

func (*RefManager) SetupWithManager

func (r *RefManager) SetupWithManager(mgr ctrl.Manager) error

func (*RefManager) UpdateSubscriptions

func (r *RefManager) UpdateSubscriptions(qc QueueContext, refs []RefSubscription) error

edge case: if the size of the list is only one element (how do you make yourself the null pointer?)

type RefReconciler

type RefReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func (*RefReconciler) Reconcile

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

type RefSubscription

type RefSubscription struct {
	Gvk            GVK
	NamespacedName types.NamespacedName
}

type SubscriptionNode

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

Jump to

Keyboard shortcuts

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