Add option to disable module management

This commit is contained in:
Daniel 2022-09-22 14:36:32 +02:00
parent 52a2a1f673
commit ddf230b33e

View file

@ -71,6 +71,12 @@ func EnableModuleManagement(changeNotifyFn func(*Module)) bool {
return false
}
// DisableModuleManagement disables module management and returns the module
// system to the default start/stop behavior.
func DisableModuleManagement() {
moduleMgmtEnabled.UnSet()
}
func (m *Module) notifyOfChange() {
if moduleMgmtEnabled.IsSet() && modulesChangeNotifyFn != nil {
m.StartWorker("notify of change", func(ctx context.Context) error {