plugin/ready: Reset list of readiness plugins on startup (#5492)

* reset readiness plugins list on startup

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2022-07-18 09:50:15 -04:00
committed by GitHub
parent c1f1184eb3
commit 29f3dcfa10
3 changed files with 71 additions and 0 deletions

View File

@@ -13,6 +13,14 @@ type list struct {
names []string
}
// Reset resets l
func (l *list) Reset() {
l.Lock()
defer l.Unlock()
l.rs = nil
l.names = nil
}
// Append adds a new readiness to l.
func (l *list) Append(r Readiness, name string) {
l.Lock()