use retry package

This commit is contained in:
Denis Mishin 2023-08-12 23:15:17 -04:00
parent 47b0f7985e
commit aa7a187d53
6 changed files with 144 additions and 45 deletions

View file

@ -60,6 +60,8 @@ func (src *source) UpdateBootstrap(ctx context.Context, cfg cluster_api.Bootstra
incoming := current.Clone()
applyBootstrapConfig(incoming.Options, &cfg)
src.markReady.Do(func() { close(src.ready) })
if cmp.Equal(incoming.Options, current.Options, cmpOpts...) {
return false
}
@ -73,8 +75,6 @@ func (src *source) UpdateBootstrap(ctx context.Context, cfg cluster_api.Bootstra
// notifyListeners notifies all listeners of a configuration change
func (src *source) notifyListeners(ctx context.Context, cfg *config.Config) {
src.markReady.Do(func() { close(src.ready) })
src.listenerLock.RLock()
listeners := make([]config.ChangeListener, len(src.listeners))
copy(listeners, src.listeners)