ResyncPeriod Comment

pull/6/head
zte-20170208 2017-02-09 10:02:55 +08:00
parent bd17091e16
commit 4f19bcb3f0
1 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,9 @@ controller, and serviceaccounts controller.`,
return cmd
}
// ResyncPeriod returns a function which generates a duration each time it is
// invoked; this is so that multiple controllers don't get into lock-step and all
// hammer the apiserver with list requests simultaneously.
func ResyncPeriod(s *options.CMServer) func() time.Duration {
return func() time.Duration {
factor := rand.Float64() + 1