@@ -17,6 +17,7 @@ limitations under the License.
1717package controller_test
1818
1919import (
20+ "context"
2021 "os"
2122
2223 corev1 "k8s.io/api/core/v1"
4142// manager.Manager will be used to Start the Controller, and will provide it a shared Cache and Client.
4243func ExampleNew () {
4344 _ , err := controller .New ("pod-controller" , mgr , controller.Options {
44- Reconciler : reconcile .Func (func (o reconcile.Request ) (reconcile.Result , error ) {
45+ Reconciler : reconcile .Func (func (context. Context , reconcile.Request ) (reconcile.Result , error ) {
4546 // Your business logic to implement the API by creating, updating, deleting objects goes here.
4647 return reconcile.Result {}, nil
4748 }),
@@ -59,7 +60,7 @@ func ExampleController() {
5960 // Create a new Controller that will call the provided Reconciler function in response
6061 // to events.
6162 c , err := controller .New ("pod-controller" , mgr , controller.Options {
62- Reconciler : reconcile .Func (func (o reconcile.Request ) (reconcile.Result , error ) {
63+ Reconciler : reconcile .Func (func (context. Context , reconcile.Request ) (reconcile.Result , error ) {
6364 // Your business logic to implement the API by creating, updating, deleting objects goes here.
6465 return reconcile.Result {}, nil
6566 }),
@@ -90,7 +91,7 @@ func ExampleController_unstructured() {
9091 // Create a new Controller that will call the provided Reconciler function in response
9192 // to events.
9293 c , err := controller .New ("pod-controller" , mgr , controller.Options {
93- Reconciler : reconcile .Func (func (o reconcile.Request ) (reconcile.Result , error ) {
94+ Reconciler : reconcile .Func (func (context. Context , reconcile.Request ) (reconcile.Result , error ) {
9495 // Your business logic to implement the API by creating, updating, deleting objects goes here.
9596 return reconcile.Result {}, nil
9697 }),
@@ -129,7 +130,7 @@ func ExampleNewUnmanaged() {
129130 // Configure creates a new controller but does not add it to the supplied
130131 // manager.
131132 c , err := controller .NewUnmanaged ("pod-controller" , mgr , controller.Options {
132- Reconciler : reconcile .Func (func (_ reconcile.Request ) (reconcile.Result , error ) {
133+ Reconciler : reconcile .Func (func (context. Context , reconcile.Request ) (reconcile.Result , error ) {
133134 return reconcile.Result {}, nil
134135 }),
135136 })
0 commit comments