1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 21:00:16 +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 *jobClient2) Cache() JobClientCache {
func (n *jobClient2) OnCreate(ctx context.Context, name string, sync JobChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &jobLifecycleDelegate{create: sync})
n.iface.AddLifecycle(ctx, name+"-create", &jobLifecycleDelegate{create: sync})
}
func (n *jobClient2) OnChange(ctx context.Context, name string, sync JobChangeHandlerFunc) {
n.loadController()
n.iface.AddLifecycle(ctx, name, &jobLifecycleDelegate{update: sync})
n.iface.AddLifecycle(ctx, name+"-change", &jobLifecycleDelegate{update: sync})
}
func (n *jobClient2) OnRemove(ctx context.Context, name string, sync JobChangeHandlerFunc) {
@@ -420,10 +420,6 @@ func (n *jobLifecycleDelegate) Remove(obj *v1.Job) (runtime.Object, error) {
return n.remove(obj)
}
func (n *jobLifecycleDelegate) HasUpdated() bool {
return n.remove != nil
}
func (n *jobLifecycleDelegate) Updated(obj *v1.Job) (runtime.Object, error) {
if n.update == nil {
return obj, nil

View File

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