2020-08-05 14:54:51 +00:00
|
|
|
/*
|
|
|
|
Copyright 2020 VMware, Inc.
|
|
|
|
SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Code generated by informer-gen. DO NOT EDIT.
|
|
|
|
|
|
|
|
package v1alpha1
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
time "time"
|
|
|
|
|
2020-08-05 20:58:03 +00:00
|
|
|
placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1"
|
2020-08-05 14:54:51 +00:00
|
|
|
versioned "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned"
|
|
|
|
internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces"
|
|
|
|
v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/listers/placeholder/v1alpha1"
|
|
|
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
|
|
watch "k8s.io/apimachinery/pkg/watch"
|
|
|
|
cache "k8s.io/client-go/tools/cache"
|
|
|
|
)
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
// CredentialRequestInformer provides access to a shared informer and lister for
|
|
|
|
// CredentialRequests.
|
|
|
|
type CredentialRequestInformer interface {
|
2020-08-05 14:54:51 +00:00
|
|
|
Informer() cache.SharedIndexInformer
|
2020-08-14 14:11:14 +00:00
|
|
|
Lister() v1alpha1.CredentialRequestLister
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
type credentialRequestInformer struct {
|
2020-08-05 14:54:51 +00:00
|
|
|
factory internalinterfaces.SharedInformerFactory
|
|
|
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
// NewCredentialRequestInformer constructs a new informer for CredentialRequest type.
|
2020-08-05 14:54:51 +00:00
|
|
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
|
|
// one. This reduces memory footprint and number of connections to the server.
|
2020-08-14 14:11:14 +00:00
|
|
|
func NewCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
|
|
return NewFilteredCredentialRequestInformer(client, resyncPeriod, indexers, nil)
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
// NewFilteredCredentialRequestInformer constructs a new informer for CredentialRequest type.
|
2020-08-05 14:54:51 +00:00
|
|
|
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
|
|
// one. This reduces memory footprint and number of connections to the server.
|
2020-08-14 14:11:14 +00:00
|
|
|
func NewFilteredCredentialRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
2020-08-05 14:54:51 +00:00
|
|
|
return cache.NewSharedIndexInformer(
|
|
|
|
&cache.ListWatch{
|
|
|
|
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
|
|
if tweakListOptions != nil {
|
|
|
|
tweakListOptions(&options)
|
|
|
|
}
|
2020-08-14 14:11:14 +00:00
|
|
|
return client.PlaceholderV1alpha1().CredentialRequests().List(context.TODO(), options)
|
2020-08-05 14:54:51 +00:00
|
|
|
},
|
|
|
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
|
|
if tweakListOptions != nil {
|
|
|
|
tweakListOptions(&options)
|
|
|
|
}
|
2020-08-14 14:11:14 +00:00
|
|
|
return client.PlaceholderV1alpha1().CredentialRequests().Watch(context.TODO(), options)
|
2020-08-05 14:54:51 +00:00
|
|
|
},
|
|
|
|
},
|
2020-08-14 14:11:14 +00:00
|
|
|
&placeholderv1alpha1.CredentialRequest{},
|
2020-08-05 14:54:51 +00:00
|
|
|
resyncPeriod,
|
|
|
|
indexers,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
func (f *credentialRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
|
|
return NewFilteredCredentialRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
func (f *credentialRequestInformer) Informer() cache.SharedIndexInformer {
|
|
|
|
return f.factory.InformerFor(&placeholderv1alpha1.CredentialRequest{}, f.defaultInformer)
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 14:11:14 +00:00
|
|
|
func (f *credentialRequestInformer) Lister() v1alpha1.CredentialRequestLister {
|
|
|
|
return v1alpha1.NewCredentialRequestLister(f.Informer().GetIndexer())
|
2020-08-05 14:54:51 +00:00
|
|
|
}
|