From 3ba8cf0f61cccdf32a96034978e7b55700e352bd Mon Sep 17 00:00:00 2001 From: Masato Naka Date: Fri, 19 Aug 2022 10:11:14 +0900 Subject: [PATCH] docs: update doc for reconcile example --- pkg/reconcile/reconcile.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/reconcile/reconcile.go b/pkg/reconcile/reconcile.go index b044e65948..6e0cea0dce 100644 --- a/pkg/reconcile/reconcile.go +++ b/pkg/reconcile/reconcile.go @@ -67,18 +67,18 @@ Example reconcile Logic: reconcile may be implemented as either a type: - type reconcile struct {} + type reconciler struct {} - func (reconcile) reconcile(controller.Request) (controller.Result, error) { + func (reconciler) Reconcile(ctx context.Context, o reconcile.Request) (reconcile.Result, error) { // Implement business logic of reading and writing objects here - return controller.Result{}, nil + return reconcile.Result{}, nil } Or as a function: - controller.Func(func(o controller.Request) (controller.Result, error) { + reconcile.Func(func(ctx context.Context, o reconcile.Request) (reconcile.Result, error) { // Implement business logic of reading and writing objects here - return controller.Result{}, nil + return reconcile.Result{}, nil }) Reconciliation is level-based, meaning action isn't driven off changes in individual Events, but instead is