mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +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
|
ConfigFile string
|
||||||
// WriteConfigTo is the path where the default configuration will be written.
|
// WriteConfigTo is the path where the default configuration will be written.
|
||||||
WriteConfigTo string
|
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
|
CleanupAndExit bool
|
||||||
// CleanupIPVS, when true, makes the proxy server clean up ipvs rules before running.
|
// CleanupIPVS, when true, makes the proxy server clean up ipvs rules before running.
|
||||||
CleanupIPVS bool
|
CleanupIPVS bool
|
||||||
|
@ -40,7 +40,7 @@ type ServiceHandler interface {
|
|||||||
// OnServiceDelete is called whenever deletion of an existing service
|
// OnServiceDelete is called whenever deletion of an existing service
|
||||||
// object is observed.
|
// object is observed.
|
||||||
OnServiceDelete(service *v1.Service)
|
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.
|
// called and the state is fully propagated to local cache.
|
||||||
OnServiceSynced()
|
OnServiceSynced()
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval
|
|||||||
// Make an instance with dependencies injected.
|
// Make an instance with dependencies injected.
|
||||||
func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner {
|
func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner {
|
||||||
if maxInterval < minInterval {
|
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 {
|
if timer == nil {
|
||||||
panic(fmt.Sprintf("%s: timer must be non-nil", name))
|
panic(fmt.Sprintf("%s: timer must be non-nil", name))
|
||||||
|
Loading…
Reference in New Issue
Block a user