watch

package
v0.0.0-...-b110700 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextSecrets

func ContextSecrets() *handler.Funcs

Types

type Interface

type Interface interface {
	WatchContexts(index indexer.IndexField) *handler.Funcs
	WatchResources(index indexer.IndexField) *handler.Funcs
	WatchApiTemplate() *handler.Funcs
	WatchTLSSecret() *handler.Funcs
}

type Type

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

func New

func New(ctx context.Context, k8s client.Client, objectList client.ObjectList) *Type

New creates a new watch instance that can be used to trigger a reconciliation when a resource of interest is updated or created. The objectList parameter is used to determine the type of resources that should be reconciled on update or create events.

func (*Type) CreateFromLookup

func (w *Type) CreateFromLookup(field indexer.IndexField) CreateFunc

CreateFromLookup creates an updater function that will trigger an update on all resources that are referencing the created object. The lookupField is the field that is used to lookup the resources. Note that this field *must* have been registered as a cache index in our main func (see main.go). This can be used to reconcile resources when have been created before their dependencies. For example, when an API is created before the management context it references.

func (*Type) UpdateFromLookup

func (w *Type) UpdateFromLookup(field indexer.IndexField) UpdateFunc

UpdateFromLookup creates an updater function that will trigger an update on all resources that are referencing the updated object. The lookupField is the field that is used to lookup the resources. Note that this field *must* have been registered as a cache index in our main func (see main.go).

func (*Type) WatchApiTemplate

func (w *Type) WatchApiTemplate() *handler.Funcs

WatchApiTemplate can be used to trigger a reconciliation when an API template is updated on resources that are depending on it. Right now this is only used for Ingress resources.

func (*Type) WatchContexts

func (w *Type) WatchContexts(index indexer.IndexField) *handler.Funcs

WatchContexts can be used to trigger a reconciliation when a management context is updated on resources that should be synced with this context.

func (*Type) WatchResources

func (w *Type) WatchResources(index indexer.IndexField) *handler.Funcs

WatchResources can be used to trigger a reconciliation when an API resource is updated on resources that are depending on it. Right now this is only used for API definitions.

func (*Type) WatchTLSSecret

func (w *Type) WatchTLSSecret() *handler.Funcs

WatchTLSSecret can be used to trigger a reconciliation when an TLS secret is updated on resources that are depending on it. Right now this is only used for Ingress resources.

Jump to

Keyboard shortcuts

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