Merge pull request #80502 from xigang/master

Update CleanupAndExit and OnServiceSynced field comment and bugfix panic params in the construct method
This commit is contained in:
Kubernetes Prow Robot 2019-08-07 20:10:06 -07:00 committed by GitHub
commit 19e85a9092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ type Options struct {
ConfigFile string
// WriteConfigTo is the path where the default configuration will be written.
WriteConfigTo string
// CleanupAndExit, when true, makes the proxy server clean up iptables rules, then exit.
// CleanupAndExit, when true, makes the proxy server clean up iptables and ipvs rules, then exit.
CleanupAndExit bool
// CleanupIPVS, when true, makes the proxy server clean up ipvs rules before running.
CleanupIPVS bool

View File

@ -40,7 +40,7 @@ type ServiceHandler interface {
// OnServiceDelete is called whenever deletion of an existing service
// object is observed.
OnServiceDelete(service *v1.Service)
// OnServiceSynced is called once all the initial even handlers were
// OnServiceSynced is called once all the initial event handlers were
// called and the state is fully propagated to local cache.
OnServiceSynced()
}

View File

@ -140,7 +140,7 @@ func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval
// Make an instance with dependencies injected.
func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner {
if maxInterval < minInterval {
panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, minInterval, maxInterval))
panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, maxInterval, minInterval))
}
if timer == nil {
panic(fmt.Sprintf("%s: timer must be non-nil", name))