From edca6489254fcc9964a2ad1d0f1ca9c04c9c8ee5 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Mon, 6 Jan 2020 16:11:26 -0500 Subject: [PATCH] A little more comment tweaking for cache.Controller Kubernetes-commit: 7d82e23e6cd61af212e73f6fb77c2f74c1628a84 --- tools/cache/controller.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/cache/controller.go b/tools/cache/controller.go index a89e5cd0..4efa8f90 100644 --- a/tools/cache/controller.go +++ b/tools/cache/controller.go @@ -54,18 +54,20 @@ type Config struct { // `"apiVersion"` must also be right. ObjectType runtime.Object - // FullResyncPeriod is the period at which ShouldResync is invoked. + // FullResyncPeriod is the period at which ShouldResync is considered. FullResyncPeriod time.Duration - // ShouldResync, if specified, is invoked when the controller's reflector determines the next - // periodic sync should occur. If this returns true, it means the reflector should proceed with - // the resync. + // ShouldResync is periodically used by the reflector to determine + // whether to Resync the Queue. If ShouldResync is `nil` or + // returns true, it means the reflector should proceed with the + // resync. ShouldResync ShouldResyncFunc // If true, when Process() returns an error, re-enqueue the object. // TODO: add interface to let you inject a delay/backoff or drop // the object completely if desired. Pass the object in - // question to this interface as a parameter. + // question to this interface as a parameter. This is probably moot + // now that this functionality appears at a higher level. RetryOnError bool }