/* Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */ // Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( "context" time "time" placeholderv1alpha1 "github.com/suzerain-io/placeholder-name-api/pkg/apis/placeholder/v1alpha1" 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" ) // LoginRequestInformer provides access to a shared informer and lister for // LoginRequests. type LoginRequestInformer interface { Informer() cache.SharedIndexInformer Lister() v1alpha1.LoginRequestLister } type loginRequestInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } // NewLoginRequestInformer constructs a new informer for LoginRequest type. // 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. func NewLoginRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredLoginRequestInformer(client, resyncPeriod, indexers, nil) } // NewFilteredLoginRequestInformer constructs a new informer for LoginRequest type. // 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. func NewFilteredLoginRequestInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PlaceholderV1alpha1().LoginRequests().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.PlaceholderV1alpha1().LoginRequests().Watch(context.TODO(), options) }, }, &placeholderv1alpha1.LoginRequest{}, resyncPeriod, indexers, ) } func (f *loginRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredLoginRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *loginRequestInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&placeholderv1alpha1.LoginRequest{}, f.defaultInformer) } func (f *loginRequestInformer) Lister() v1alpha1.LoginRequestLister { return v1alpha1.NewLoginRequestLister(f.Informer().GetIndexer()) }