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

@@ -19,6 +19,7 @@ limitations under the License.
package informers
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
admissionregistration "k8s.io/client-go/informers/admissionregistration"
@@ -43,9 +44,11 @@ import (
)
type sharedInformerFactory struct {
client kubernetes.Interface
lock sync.Mutex
defaultResync time.Duration
client kubernetes.Interface
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
lock sync.Mutex
defaultResync time.Duration
informers map[reflect.Type]cache.SharedIndexInformer
// startedInformers is used for tracking which informers have been started.
@@ -55,8 +58,17 @@ type sharedInformerFactory struct {
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory
func NewSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration) SharedInformerFactory {
return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil)
}
// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory.
// Listers obtained via this SharedInformerFactory will be subject to the same filters
// as specified here.
func NewFilteredSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory {
return &sharedInformerFactory{
client: client,
namespace: namespace,
tweakListOptions: tweakListOptions,
defaultResync: defaultResync,
informers: make(map[reflect.Type]cache.SharedIndexInformer),
startedInformers: make(map[reflect.Type]bool),
@@ -138,53 +150,53 @@ type SharedInformerFactory interface {
}
func (f *sharedInformerFactory) Admissionregistration() admissionregistration.Interface {
return admissionregistration.New(f)
return admissionregistration.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Apps() apps.Interface {
return apps.New(f)
return apps.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface {
return autoscaling.New(f)
return autoscaling.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Batch() batch.Interface {
return batch.New(f)
return batch.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Certificates() certificates.Interface {
return certificates.New(f)
return certificates.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Core() core.Interface {
return core.New(f)
return core.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Extensions() extensions.Interface {
return extensions.New(f)
return extensions.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Networking() networking.Interface {
return networking.New(f)
return networking.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Policy() policy.Interface {
return policy.New(f)
return policy.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f)
return rbac.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Scheduling() scheduling.Interface {
return scheduling.New(f)
return scheduling.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Settings() settings.Interface {
return settings.New(f)
return settings.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f)
return storage.New(f, f.namespace, f.tweakListOptions)
}