1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 12:48:45 +00:00

Update generated code

This commit is contained in:
Darren Shepherd
2018-11-26 10:49:25 -07:00
parent d1d270153d
commit a4de4c1716
172 changed files with 1032 additions and 516 deletions

View File

@@ -343,12 +343,12 @@ func (n *ingressClient2) Cache() IngressClientCache {
func (n *ingressClient2) OnCreate(ctx context.Context, name string, sync IngressChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &ingressLifecycleDelegate{create: sync})
n.iface.AddLifecycle(ctx, name+"-create", &ingressLifecycleDelegate{create: sync})
}
func (n *ingressClient2) OnChange(ctx context.Context, name string, sync IngressChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &ingressLifecycleDelegate{update: sync})
n.iface.AddLifecycle(ctx, name+"-change", &ingressLifecycleDelegate{update: sync})
}
func (n *ingressClient2) OnRemove(ctx context.Context, name string, sync IngressChangeHandlerFunc) {
@@ -420,10 +420,6 @@ func (n *ingressLifecycleDelegate) Remove(obj *v1beta1.Ingress) (runtime.Object,
return n.remove(obj)
}
func (n *ingressLifecycleDelegate) HasUpdated() bool {
return n.remove != nil
}
func (n *ingressLifecycleDelegate) Updated(obj *v1beta1.Ingress) (runtime.Object, error) {
if n.update == nil {
return obj, nil

View File

@@ -16,6 +16,16 @@ type ingressLifecycleAdapter struct {
lifecycle IngressLifecycle
}
func (w *ingressLifecycleAdapter) HasCreate() bool {
o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition)
return !ok || o.HasCreate()
}
func (w *ingressLifecycleAdapter) HasFinalize() bool {
o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition)
return !ok || o.HasFinalize()
}
func (w *ingressLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1beta1.Ingress))
if o == nil {

View File

@@ -342,12 +342,12 @@ func (n *podSecurityPolicyClient2) Cache() PodSecurityPolicyClientCache {
func (n *podSecurityPolicyClient2) OnCreate(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &podSecurityPolicyLifecycleDelegate{create: sync})
n.iface.AddLifecycle(ctx, name+"-create", &podSecurityPolicyLifecycleDelegate{create: sync})
}
func (n *podSecurityPolicyClient2) OnChange(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &podSecurityPolicyLifecycleDelegate{update: sync})
n.iface.AddLifecycle(ctx, name+"-change", &podSecurityPolicyLifecycleDelegate{update: sync})
}
func (n *podSecurityPolicyClient2) OnRemove(ctx context.Context, name string, sync PodSecurityPolicyChangeHandlerFunc) {
@@ -419,10 +419,6 @@ func (n *podSecurityPolicyLifecycleDelegate) Remove(obj *v1beta1.PodSecurityPoli
return n.remove(obj)
}
func (n *podSecurityPolicyLifecycleDelegate) HasUpdated() bool {
return n.remove != nil
}
func (n *podSecurityPolicyLifecycleDelegate) Updated(obj *v1beta1.PodSecurityPolicy) (runtime.Object, error) {
if n.update == nil {
return obj, nil

View File

@@ -16,6 +16,16 @@ type podSecurityPolicyLifecycleAdapter struct {
lifecycle PodSecurityPolicyLifecycle
}
func (w *podSecurityPolicyLifecycleAdapter) HasCreate() bool {
o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition)
return !ok || o.HasCreate()
}
func (w *podSecurityPolicyLifecycleAdapter) HasFinalize() bool {
o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition)
return !ok || o.HasFinalize()
}
func (w *podSecurityPolicyLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*v1beta1.PodSecurityPolicy))
if o == nil {