Skip to content

Commit 7a5d60d

Browse files
authored
Merge pull request #1983 from nakamasato/fix-reconciler-comment
📖 update doc for reconcile example
2 parents 2d210d0 + 3ba8cf0 commit 7a5d60d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/reconcile/reconcile.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ Example reconcile Logic:
6767
6868
reconcile may be implemented as either a type:
6969
70-
type reconcile struct {}
70+
type reconciler struct {}
7171
72-
func (reconcile) reconcile(controller.Request) (controller.Result, error) {
72+
func (reconciler) Reconcile(ctx context.Context, o reconcile.Request) (reconcile.Result, error) {
7373
// Implement business logic of reading and writing objects here
74-
return controller.Result{}, nil
74+
return reconcile.Result{}, nil
7575
}
7676
7777
Or as a function:
7878
79-
controller.Func(func(o controller.Request) (controller.Result, error) {
79+
reconcile.Func(func(ctx context.Context, o reconcile.Request) (reconcile.Result, error) {
8080
// Implement business logic of reading and writing objects here
81-
return controller.Result{}, nil
81+
return reconcile.Result{}, nil
8282
})
8383
8484
Reconciliation is level-based, meaning action isn't driven off changes in individual Events, but instead is

0 commit comments

Comments
 (0)