Skip to content

Commit

Permalink
Merge pull request #1983 from nakamasato/fix-reconciler-comment
Browse files Browse the repository at this point in the history
📖 update doc for reconcile example
  • Loading branch information
k8s-ci-robot authored Aug 23, 2022
2 parents 2d210d0 + 3ba8cf0 commit 7a5d60d
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 7a5d60d

Please sign in to comment.