Skip to content

Commit

Permalink
docs: update doc for reconcile example
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamasato committed Aug 19, 2022
1 parent 2d210d0 commit 3ba8cf0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/reconcile/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ba8cf0

Please sign in to comment.