source

package
v0.20.0-alpha.5...-0802177 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

Source is a source of events (e.g. Create, Update, Delete operations on Kubernetes Objects, Webhook callbacks, etc) which should be processed by event.EventHandlers to enqueue reconcile.Requests.

* Use Kind for events originating in the cluster (e.g. Pod Create, Pod Update, Deployment Update).

* Use Channel for events originating outside the cluster (e.g. GitHub Webhook callback, Polling external urls).

Users may build their own Source implementations.

type SyncingSource

type SyncingSource[object client.Object] TypedSyncingSource[object, mcreconcile.Request]

SyncingSource is a source that needs syncing prior to being usable. The controller will call its WaitForSync prior to starting workers.

func Kind

func Kind[object client.Object](
	obj object,
	handler mchandler.TypedEventHandlerFunc[object, mcreconcile.Request],
	predicates ...predicate.TypedPredicate[object],
) SyncingSource[object]

Kind creates a KindSource with the given cache provider.

type TypedSource

type TypedSource[object client.Object, request mcreconcile.ClusterAware[request]] interface {
	ForCluster(string, cluster.Cluster) (source.TypedSource[request], error)
}

TypedSource is a generic source of events (e.g. Create, Update, Delete operations on Kubernetes Objects, Webhook callbacks, etc) which should be processed by event.EventHandlers to enqueue a request.

* Use Kind for events originating in the cluster (e.g. Pod Create, Pod Update, Deployment Update).

* Use Channel for events originating outside the cluster (e.g. GitHub Webhook callback, Polling external urls).

Users may build their own Source implementations.

type TypedSyncingSource

type TypedSyncingSource[object client.Object, request mcreconcile.ClusterAware[request]] interface {
	TypedSource[object, request]
	SyncingForCluster(string, cluster.Cluster) (source.TypedSyncingSource[request], error)
	WithProjection(func(cluster.Cluster, object) (object, error)) TypedSyncingSource[object, request]
}

TypedSyncingSource is a source that needs syncing prior to being usable. The controller will call its WaitForSync prior to starting workers.

func TypedKind

func TypedKind[object client.Object, request mcreconcile.ClusterAware[request]](
	obj object,
	handler mchandler.TypedEventHandlerFunc[object, request],
	predicates ...predicate.TypedPredicate[object],
) TypedSyncingSource[object, request]

TypedKind creates a KindSource with the given cache provider.

Jump to

Keyboard shortcuts

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