From 36a47f92cb8dcd2241a34e919462980572a5c528 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Thu, 5 Dec 2024 09:57:26 -0800 Subject: [PATCH] Reword Completed doc --- pkg/result/result_helper.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/result/result_helper.go b/pkg/result/result_helper.go index 3558a6382..533c7f063 100644 --- a/pkg/result/result_helper.go +++ b/pkg/result/result_helper.go @@ -32,11 +32,13 @@ var _ error = reconcile.TerminalError(nil) // // Possibly inspect the result (e.g. to set an error field in the status) // return recResult.Output() type ReconcileResult interface { - // Completed indicates that this result is *NOT* a [Continue]. + // Completed indicates that the current iteration of the reconciliation loop is complete, and the top-level + // Reconcile() method should return [ReconcileResult.Output] to the controller runtime. // - // In other words, it means that the current iteration of the reconciliation loop is complete, and the top-level - // Reconcile() method should return to the controller runtime (either with a success or terminal error that will - // stop the entire reconciliation loop, or a requeue or regular error that will trigger a retry). + // This returns true for a [Done] or terminal [Error] (where the output will stop the entire reconciliation loop); + // and for a [RequeueSoon] or regular [Error] (where the output will trigger a retry). + // + // This returns false for a [Continue]. Completed() bool // Output converts this result into a format that the main Reconcile() method can return to the controller runtime. //