use istio client-go library instead of knative (#1661)

use istio client-go library instead of knative
bump kubernetes dependency version
change code coverage to codecov
This commit is contained in:
zryfish
2019-12-13 11:26:18 +08:00
committed by GitHub
parent f249a6e081
commit ea88c8803d
2071 changed files with 354531 additions and 108336 deletions

View File

@@ -0,0 +1,30 @@
// Code generated by informer-gen. DO NOT EDIT.
package config
import (
v1alpha2 "istio.io/client-go/pkg/informers/externalversions/config/v1alpha2"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha2 provides access to shared informers for resources in V1alpha2.
V1alpha2() v1alpha2.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha2 returns a new v1alpha2.Interface.
func (g *group) V1alpha2() v1alpha2.Interface {
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// AttributeManifestInformer provides access to a shared informer and lister for
// AttributeManifests.
type AttributeManifestInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.AttributeManifestLister
}
type attributeManifestInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewAttributeManifestInformer constructs a new informer for AttributeManifest 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 NewAttributeManifestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredAttributeManifestInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredAttributeManifestInformer constructs a new informer for AttributeManifest 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 NewFilteredAttributeManifestInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().AttributeManifests(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().AttributeManifests(namespace).Watch(options)
},
},
&configv1alpha2.AttributeManifest{},
resyncPeriod,
indexers,
)
}
func (f *attributeManifestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredAttributeManifestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *attributeManifestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.AttributeManifest{}, f.defaultInformer)
}
func (f *attributeManifestInformer) Lister() v1alpha2.AttributeManifestLister {
return v1alpha2.NewAttributeManifestLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// HandlerInformer provides access to a shared informer and lister for
// Handlers.
type HandlerInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.HandlerLister
}
type handlerInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewHandlerInformer constructs a new informer for Handler 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 NewHandlerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredHandlerInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredHandlerInformer constructs a new informer for Handler 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 NewFilteredHandlerInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().Handlers(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().Handlers(namespace).Watch(options)
},
},
&configv1alpha2.Handler{},
resyncPeriod,
indexers,
)
}
func (f *handlerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredHandlerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *handlerInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.Handler{}, f.defaultInformer)
}
func (f *handlerInformer) Lister() v1alpha2.HandlerLister {
return v1alpha2.NewHandlerLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// HTTPAPISpecInformer provides access to a shared informer and lister for
// HTTPAPISpecs.
type HTTPAPISpecInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.HTTPAPISpecLister
}
type hTTPAPISpecInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewHTTPAPISpecInformer constructs a new informer for HTTPAPISpec 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 NewHTTPAPISpecInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredHTTPAPISpecInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredHTTPAPISpecInformer constructs a new informer for HTTPAPISpec 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 NewFilteredHTTPAPISpecInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().HTTPAPISpecs(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().HTTPAPISpecs(namespace).Watch(options)
},
},
&configv1alpha2.HTTPAPISpec{},
resyncPeriod,
indexers,
)
}
func (f *hTTPAPISpecInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredHTTPAPISpecInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *hTTPAPISpecInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.HTTPAPISpec{}, f.defaultInformer)
}
func (f *hTTPAPISpecInformer) Lister() v1alpha2.HTTPAPISpecLister {
return v1alpha2.NewHTTPAPISpecLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// HTTPAPISpecBindingInformer provides access to a shared informer and lister for
// HTTPAPISpecBindings.
type HTTPAPISpecBindingInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.HTTPAPISpecBindingLister
}
type hTTPAPISpecBindingInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewHTTPAPISpecBindingInformer constructs a new informer for HTTPAPISpecBinding 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 NewHTTPAPISpecBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredHTTPAPISpecBindingInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredHTTPAPISpecBindingInformer constructs a new informer for HTTPAPISpecBinding 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 NewFilteredHTTPAPISpecBindingInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().HTTPAPISpecBindings(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().HTTPAPISpecBindings(namespace).Watch(options)
},
},
&configv1alpha2.HTTPAPISpecBinding{},
resyncPeriod,
indexers,
)
}
func (f *hTTPAPISpecBindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredHTTPAPISpecBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *hTTPAPISpecBindingInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.HTTPAPISpecBinding{}, f.defaultInformer)
}
func (f *hTTPAPISpecBindingInformer) Lister() v1alpha2.HTTPAPISpecBindingLister {
return v1alpha2.NewHTTPAPISpecBindingLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// InstanceInformer provides access to a shared informer and lister for
// Instances.
type InstanceInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.InstanceLister
}
type instanceInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewInstanceInformer constructs a new informer for Instance 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 NewInstanceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredInstanceInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredInstanceInformer constructs a new informer for Instance 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 NewFilteredInstanceInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().Instances(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().Instances(namespace).Watch(options)
},
},
&configv1alpha2.Instance{},
resyncPeriod,
indexers,
)
}
func (f *instanceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredInstanceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *instanceInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.Instance{}, f.defaultInformer)
}
func (f *instanceInformer) Lister() v1alpha2.InstanceLister {
return v1alpha2.NewInstanceLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,78 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// AttributeManifests returns a AttributeManifestInformer.
AttributeManifests() AttributeManifestInformer
// HTTPAPISpecs returns a HTTPAPISpecInformer.
HTTPAPISpecs() HTTPAPISpecInformer
// HTTPAPISpecBindings returns a HTTPAPISpecBindingInformer.
HTTPAPISpecBindings() HTTPAPISpecBindingInformer
// Handlers returns a HandlerInformer.
Handlers() HandlerInformer
// Instances returns a InstanceInformer.
Instances() InstanceInformer
// QuotaSpecs returns a QuotaSpecInformer.
QuotaSpecs() QuotaSpecInformer
// QuotaSpecBindings returns a QuotaSpecBindingInformer.
QuotaSpecBindings() QuotaSpecBindingInformer
// Rules returns a RuleInformer.
Rules() RuleInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// AttributeManifests returns a AttributeManifestInformer.
func (v *version) AttributeManifests() AttributeManifestInformer {
return &attributeManifestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// HTTPAPISpecs returns a HTTPAPISpecInformer.
func (v *version) HTTPAPISpecs() HTTPAPISpecInformer {
return &hTTPAPISpecInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// HTTPAPISpecBindings returns a HTTPAPISpecBindingInformer.
func (v *version) HTTPAPISpecBindings() HTTPAPISpecBindingInformer {
return &hTTPAPISpecBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// Handlers returns a HandlerInformer.
func (v *version) Handlers() HandlerInformer {
return &handlerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// Instances returns a InstanceInformer.
func (v *version) Instances() InstanceInformer {
return &instanceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// QuotaSpecs returns a QuotaSpecInformer.
func (v *version) QuotaSpecs() QuotaSpecInformer {
return &quotaSpecInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// QuotaSpecBindings returns a QuotaSpecBindingInformer.
func (v *version) QuotaSpecBindings() QuotaSpecBindingInformer {
return &quotaSpecBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// Rules returns a RuleInformer.
func (v *version) Rules() RuleInformer {
return &ruleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// QuotaSpecInformer provides access to a shared informer and lister for
// QuotaSpecs.
type QuotaSpecInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.QuotaSpecLister
}
type quotaSpecInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewQuotaSpecInformer constructs a new informer for QuotaSpec 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 NewQuotaSpecInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredQuotaSpecInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredQuotaSpecInformer constructs a new informer for QuotaSpec 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 NewFilteredQuotaSpecInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().QuotaSpecs(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().QuotaSpecs(namespace).Watch(options)
},
},
&configv1alpha2.QuotaSpec{},
resyncPeriod,
indexers,
)
}
func (f *quotaSpecInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredQuotaSpecInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *quotaSpecInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.QuotaSpec{}, f.defaultInformer)
}
func (f *quotaSpecInformer) Lister() v1alpha2.QuotaSpecLister {
return v1alpha2.NewQuotaSpecLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// QuotaSpecBindingInformer provides access to a shared informer and lister for
// QuotaSpecBindings.
type QuotaSpecBindingInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.QuotaSpecBindingLister
}
type quotaSpecBindingInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewQuotaSpecBindingInformer constructs a new informer for QuotaSpecBinding 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 NewQuotaSpecBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredQuotaSpecBindingInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredQuotaSpecBindingInformer constructs a new informer for QuotaSpecBinding 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 NewFilteredQuotaSpecBindingInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().QuotaSpecBindings(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().QuotaSpecBindings(namespace).Watch(options)
},
},
&configv1alpha2.QuotaSpecBinding{},
resyncPeriod,
indexers,
)
}
func (f *quotaSpecBindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredQuotaSpecBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *quotaSpecBindingInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.QuotaSpecBinding{}, f.defaultInformer)
}
func (f *quotaSpecBindingInformer) Lister() v1alpha2.QuotaSpecBindingLister {
return v1alpha2.NewQuotaSpecBindingLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
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"
)
// RuleInformer provides access to a shared informer and lister for
// Rules.
type RuleInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.RuleLister
}
type ruleInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewRuleInformer constructs a new informer for Rule 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 NewRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredRuleInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredRuleInformer constructs a new informer for Rule 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 NewFilteredRuleInformer(client versioned.Interface, namespace string, 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.ConfigV1alpha2().Rules(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().Rules(namespace).Watch(options)
},
},
&configv1alpha2.Rule{},
resyncPeriod,
indexers,
)
}
func (f *ruleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredRuleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *ruleInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.Rule{}, f.defaultInformer)
}
func (f *ruleInformer) Lister() v1alpha2.RuleLister {
return v1alpha2.NewRuleLister(f.Informer().GetIndexer())
}