run hack/update-codegen.sh

Kubernetes-commit: 6a4b80fcabc5e950af997d97f447354b83fcdcc4
This commit is contained in:
James Munnelly
2017-11-01 14:32:22 +00:00
committed by Kubernetes Publisher
parent d017730688
commit a6812b3f80
96 changed files with 1405 additions and 439 deletions

View File

@@ -33,20 +33,22 @@ type Interface interface {
}
type group struct {
internalinterfaces.SharedInformerFactory
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory) Interface {
return &group{f}
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1 returns a new v1.Interface.
func (g *group) V1() v1.Interface {
return v1.New(g.SharedInformerFactory)
return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.SharedInformerFactory)
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@@ -29,15 +29,17 @@ type Interface interface {
}
type version struct {
internalinterfaces.SharedInformerFactory
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory) Interface {
return &version{f}
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// StorageClasses returns a StorageClassInformer.
func (v *version) StorageClasses() StorageClassInformer {
return &storageClassInformer{factory: v.SharedInformerFactory}
return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -38,19 +38,33 @@ type StorageClassInformer interface {
}
type storageClassInformer struct {
factory internalinterfaces.SharedInformerFactory
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewStorageClassInformer constructs a new informer for StorageClass 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 NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredStorageClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredStorageClassInformer constructs a new informer for StorageClass 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 NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StorageV1().StorageClasses().List(options)
},
WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StorageV1().StorageClasses().Watch(options)
},
},
@@ -60,12 +74,12 @@ func NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Dura
)
}
func defaultStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&storage_v1.StorageClass{}, defaultStorageClassInformer)
return f.factory.InformerFor(&storage_v1.StorageClass{}, f.defaultInformer)
}
func (f *storageClassInformer) Lister() v1.StorageClassLister {

View File

@@ -29,15 +29,17 @@ type Interface interface {
}
type version struct {
internalinterfaces.SharedInformerFactory
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory) Interface {
return &version{f}
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// StorageClasses returns a StorageClassInformer.
func (v *version) StorageClasses() StorageClassInformer {
return &storageClassInformer{factory: v.SharedInformerFactory}
return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -38,19 +38,33 @@ type StorageClassInformer interface {
}
type storageClassInformer struct {
factory internalinterfaces.SharedInformerFactory
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewStorageClassInformer constructs a new informer for StorageClass 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 NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredStorageClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredStorageClassInformer constructs a new informer for StorageClass 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 NewFilteredStorageClassInformer(client kubernetes.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.StorageV1beta1().StorageClasses().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StorageV1beta1().StorageClasses().Watch(options)
},
},
@@ -60,12 +74,12 @@ func NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Dura
)
}
func defaultStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *storageClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, defaultStorageClassInformer)
return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, f.defaultInformer)
}
func (f *storageClassInformer) Lister() v1beta1.StorageClassLister {