mirror of
https://github.com/kubereboot/kured.git
synced 2026-05-20 07:12:58 +00:00
This at the same time, removes the alert public package. Alert was only used inside prometheus blocker, so it allows to simplify the code. Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
19 lines
424 B
Go
19 lines
424 B
Go
package blockers
|
|
|
|
// RebootBlocked checks that a single block Checker
|
|
// will block the reboot or not.
|
|
func RebootBlocked(blockers ...RebootBlocker) bool {
|
|
for _, blocker := range blockers {
|
|
if blocker.IsBlocked() {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// RebootBlocker interface should be implemented by types
|
|
// to know if their instantiations should block a reboot
|
|
type RebootBlocker interface {
|
|
IsBlocked() bool
|
|
}
|