gvk

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lister

type Lister interface {
	List() ([]schema.GroupVersionKind, error)
}

Lister is any object that can list a set of GVKs or return an error

func NewLister

func NewLister(discovery discovery.DiscoveryInterface) Lister

NewLister returns an object that implements the Lister interface

type Resolver

type Resolver func(gvk schema.GroupVersionKind, namespace, name string, _ runtime.Object) ([]relatedresource.Key, error)

Resolver is a relatedresource.Resolver that can work on multiple GVKs

func (Resolver) ForGVK

ForGVK returns the relatedresource.Resolver for a particular GVK

type Watcher

type Watcher interface {
	// Start will run all the watchers that have been registered thus far and deferred from starting
	Start(ctx context.Context, workers int) error
	// Watch will start a new watcher for a particular GVK; if the Watcher has not started yet,
	// watching will be deferred till the first Start call is made.
	Watch(gvk schema.GroupVersionKind) error
}

Watcher starts controllers for one or more GVKs using the provided SharedControllerFactory After starting a GVK controller, it will register a relatedresource.Watch using the provided relatedresource.Enqueuer and Resolver

func NewWatcher

func NewWatcher(scf controller.SharedControllerFactory, gvkResolver Resolver, enqueuer relatedresource.Enqueuer) Watcher

NewWatcher returns an object that satisfies the Watcher interface

Jump to

Keyboard shortcuts

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