@@ -19,6 +19,7 @@ type Funcs struct {
19
19
DeleteAllOf func (ctx context.Context , client client.WithWatch , obj client.Object , opts ... client.DeleteAllOfOption ) error
20
20
Update func (ctx context.Context , client client.WithWatch , obj client.Object , opts ... client.UpdateOption ) error
21
21
Patch func (ctx context.Context , client client.WithWatch , obj client.Object , patch client.Patch , opts ... client.PatchOption ) error
22
+ Apply func (ctx context.Context , client client.WithWatch , obj client.Object , fieldOwner string ) error
22
23
Watch func (ctx context.Context , client client.WithWatch , obj client.ObjectList , opts ... client.ListOption ) (watch.Interface , error )
23
24
SubResource func (client client.WithWatch , subResource string ) client.SubResourceClient
24
25
SubResourceGet func (ctx context.Context , client client.Client , subResourceName string , obj client.Object , subResource client.Object , opts ... client.SubResourceGetOption ) error
@@ -92,6 +93,13 @@ func (c interceptor) Patch(ctx context.Context, obj client.Object, patch client.
92
93
return c .client .Patch (ctx , obj , patch , opts ... )
93
94
}
94
95
96
+ func (c interceptor ) Apply (ctx context.Context , obj client.Object , fieldOwner string ) error {
97
+ if c .funcs .Patch != nil {
98
+ return c .funcs .Apply (ctx , c .client , obj , fieldOwner )
99
+ }
100
+ return c .client .Apply (ctx , obj , fieldOwner )
101
+ }
102
+
95
103
func (c interceptor ) DeleteAllOf (ctx context.Context , obj client.Object , opts ... client.DeleteAllOfOption ) error {
96
104
if c .funcs .DeleteAllOf != nil {
97
105
return c .funcs .DeleteAllOf (ctx , c .client , obj , opts ... )
0 commit comments