mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
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:
commit
19e85a9092
@ -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
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user