informers

package
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeMetadataLister

type FakeMetadataLister struct {
	FakeList        func(labels.Selector) ([]*metav1.PartialObjectMetadata, error)
	FakeGet         func(string) (*metav1.PartialObjectMetadata, error)
	NamespaceLister metadatalister.NamespaceLister
}

FakeMetadataLister is a fake of metadata Lister https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/metadata/metadatalister/interface.go#L24-L32

func (FakeMetadataLister) Get

func (FakeMetadataLister) List

func (FakeMetadataLister) Namespace

type FakeMetadataNamespaceLister

type FakeMetadataNamespaceLister struct {
	FakeList func(labels.Selector) ([]*metav1.PartialObjectMetadata, error)
	FakeGet  func(string) (*metav1.PartialObjectMetadata, error)
}

FakeMetadataNamespaceLister is a fake of metadata NamespaceLister https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/metadata/metadatalister/interface.go#L34-L40

func (FakeMetadataNamespaceLister) Get

func (FakeMetadataNamespaceLister) List

type FakeSecretInterface

type FakeSecretInterface struct {
	FakeGet  func(context.Context, string, metav1.GetOptions) (*corev1.Secret, error)
	FakeList func(context.Context, metav1.ListOptions) (*corev1.SecretList, error)
}

FakeSecretInterface is a fake of corev1 SecretInterface https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/kubernetes/typed/core/v1/secret.go#L39-L50

func (FakeSecretInterface) Apply

func (FakeSecretInterface) Create

func (FakeSecretInterface) Delete

func (fsi FakeSecretInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error

func (FakeSecretInterface) DeleteCollection

func (fsi FakeSecretInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

func (FakeSecretInterface) Get

func (FakeSecretInterface) List

func (FakeSecretInterface) Patch

func (fsi FakeSecretInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Secret, err error)

func (FakeSecretInterface) Update

func (FakeSecretInterface) Watch

type FakeSecretLister

type FakeSecretLister struct {
	NamespaceLister FakeSecretNamespaceLister
	FakeList        func(labels.Selector) ([]*corev1.Secret, error)
}

FakeSecretLister is a fake of SecretLister https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/listers/core/v1/secret.go#L28-L37

func (FakeSecretLister) List

func (fsl FakeSecretLister) List(selector labels.Selector) ([]*corev1.Secret, error)

func (FakeSecretLister) Secrets

type FakeSecretNamespaceLister

type FakeSecretNamespaceLister struct {
	FakeList func(labels.Selector) ([]*corev1.Secret, error)
	FakeGet  func(string) (*corev1.Secret, error)
}

FakeSecretNamespaceLister is a fake of SecretNamespaceLister https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/listers/core/v1/secret.go#L62-L72.

func (FakeSecretNamespaceLister) Get

func (fsnl FakeSecretNamespaceLister) Get(name string) (*corev1.Secret, error)

func (FakeSecretNamespaceLister) List

func (fsnl FakeSecretNamespaceLister) List(selector labels.Selector) ([]*corev1.Secret, error)

type FakeSecretsGetter

type FakeSecretsGetter struct {
	FakeSecrets func(string) typedcorev1.SecretInterface
}

FakeSecretsGetter is a fake of corev1 SecretsGetter https://github.com/kubernetes/client-go/blob/0382bf0f53b2294d4ac448203718f0ba774a477d/kubernetes/typed/core/v1/secret.go#L33-L37

func (FakeSecretsGetter) Secrets

func (fsg FakeSecretsGetter) Secrets(namespace string) typedcorev1.SecretInterface

type Informer

type Informer interface {
	// AddEventHadler allows reconcile loop to register an event handler so
	// it gets triggered when the informer has a new event
	AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)
	// HasSynced returns true if the informer's cache has synced (at least
	// one LIST has been performed)
	HasSynced() bool
}

Informer is a subset of client-go SharedIndexInformer https://github.com/kubernetes/client-go/blob/release-1.26/tools/cache/shared_informer.go#L35-L211

type KubeInformerFactory

type KubeInformerFactory interface {
	Start(<-chan struct{})
	WaitForCacheSync(<-chan struct{}) map[string]bool
	Ingresses() networkingv1informers.IngressInformer
	Secrets() SecretInformer
	CertificateSigningRequests() certificatesv1.CertificateSigningRequestInformer
}

KubeSharedInformerFactory represents a subset of methods in informers.sharedInformerFactory. It allows us to use a wrapper around informers.sharedInformerFactory to enforce particular custom informers for certain types, for example a filtered informer for Secrets If you need to start watching a new core type, add a method that returns an informer for that type here. If you don't need special filters, make it return an informer from baseFactory

func NewBaseKubeInformerFactory

func NewBaseKubeInformerFactory(client kubernetes.Interface, resync time.Duration, namespace string) KubeInformerFactory

func NewFilteredSecretsKubeInformerFactory

func NewFilteredSecretsKubeInformerFactory(ctx context.Context, typedClient kubernetes.Interface, metadataClient metadata.Interface, resync time.Duration, namespace string) KubeInformerFactory

type SecretInformer

type SecretInformer interface {
	// Informer ensures that an Informer has been initialized and returns the initialized informer.
	Informer() Informer
	// Lister returns a lister for the initialized informer. It will also ensure that the informer exists.
	Lister() SecretLister
}

SecretInformer is like client-go SecretInformer https://github.com/kubernetes/client-go/blob/release-1.26/informers/core/v1/secret.go#L35-L40 but embeds our own interfaces with a smaller subset of methods.

type SecretLister

type SecretLister interface {
	// Secrets returns a namespace secrets getter/lister
	Secrets(namespace string) corev1listers.SecretNamespaceLister
}

SecretLister is a subset of client-go SecretLister functionality https://github.com/kubernetes/client-go/blob/release-1.26/listers/core/v1/secret.go#L28-L37

Jump to

Keyboard shortcuts

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