Documentation ¶
Index ¶
- Variables
- func CreateEmptyWritableFile(filePath string) error
- func GetGlobalHookConfigSchema(version string) *spec.Schema
- func GetModuleHookConfigSchema(version string) *spec.Schema
- func MergeLayers(initial utils.Values, layers ...interface{}) utils.Values
- func NewHookConfigFromGoConfig(input *go_hook.HookConfig) (config.HookConfig, error)
- func NewMainModuleManager() *moduleManager
- func ReadOpenAPIFiles(openApiDir string) (configSchemaBytes, valuesSchemaBytes []byte, err error)
- type AfterAllConfig
- type AfterDeleteHelmConfig
- type AfterHelmConfig
- type ApplyDefaultsForGlobal
- type ApplyDefaultsForModule
- type BeforeAllConfig
- type BeforeHelmConfig
- type ChangeType
- type CommonHook
- func (h *CommonHook) GetGoHook() go_hook.GoHook
- func (h *CommonHook) GetName() string
- func (h *CommonHook) GetPath() string
- func (h *CommonHook) SynchronizationDone() bool
- func (h *CommonHook) SynchronizationNeeded() bool
- func (h *CommonHook) SynchronizationQueued() bool
- func (c *CommonHook) WithGoHook(h go_hook.GoHook)
- func (c *CommonHook) WithModuleManager(moduleManager *moduleManager)
- type Event
- type EventType
- type GlobalHook
- func (gh *GlobalHook) GetConfigDescription() string
- func (h *GlobalHook) GetConfigValues() utils.Values
- func (h *GlobalHook) GetValues() (utils.Values, error)
- func (g *GlobalHook) Order(binding BindingType) float64
- func (h *GlobalHook) PrepareTmpFilesForHookRun(bindingContext []byte) (tmpFiles map[string]string, err error)
- func (h *GlobalHook) Run(bindingType BindingType, bindingContext []BindingContext, ...) error
- func (g *GlobalHook) WithConfig(configOutput []byte) (err error)
- func (g *GlobalHook) WithGoConfig(config *go_hook.HookConfig) (err error)
- type GlobalHookConfig
- func (c *GlobalHookConfig) Bindings() []BindingType
- func (c *GlobalHookConfig) BindingsCount() int
- func (c *GlobalHookConfig) ConvertAfterAll(value interface{}) (*AfterAllConfig, error)
- func (c *GlobalHookConfig) ConvertAndCheck(data []byte) error
- func (c *GlobalHookConfig) ConvertAndCheckV0() (err error)
- func (c *GlobalHookConfig) ConvertAndCheckV1() (err error)
- func (c *GlobalHookConfig) ConvertBeforeAll(value interface{}) (*BeforeAllConfig, error)
- func (c *GlobalHookConfig) HasBinding(binding BindingType) bool
- func (c *GlobalHookConfig) LoadAndValidate(data []byte) error
- type GlobalHookConfigV0
- type Hook
- type HookExecutor
- type HookResult
- type KubernetesBindingSynchronizationState
- type Module
- func (m *Module) ConfigValues() utils.Values
- func (m *Module) Delete(logLabels map[string]string) error
- func (m *Module) PrepareValuesYamlFile() (string, error)
- func (m *Module) Run(logLabels map[string]string) (bool, error)
- func (m *Module) RunOnStartup(logLabels map[string]string) error
- func (m *Module) SafeName() string
- func (m *Module) ShouldRunHelmUpgrade(helmClient client.HelmClient, releaseName string, checksum string, ...) (bool, error)
- func (m *Module) StaticAndConfigValues() utils.Values
- func (m *Module) StaticAndNewValues(newValues utils.Values) utils.Values
- func (m *Module) SynchronizationDone() bool
- func (m *Module) SynchronizationNeeded() bool
- func (m *Module) SynchronizationQueued() bool
- func (m *Module) Values() (utils.Values, error)
- func (m *Module) ValuesForEnabledScript(precedingEnabledModules []string) (utils.Values, error)
- func (m *Module) ValuesKey() string
- func (m *Module) ValuesPatches() []utils.ValuesPatch
- func (m *Module) WithMetricStorage(mstor *metric_storage.MetricStorage)
- func (m *Module) WithModuleManager(moduleManager *moduleManager)
- type ModuleChange
- type ModuleHook
- func (m *ModuleHook) GetConfigDescription() string
- func (h *ModuleHook) GetConfigValues() utils.Values
- func (h *ModuleHook) GetValues() (utils.Values, error)
- func (m *ModuleHook) Order(binding BindingType) float64
- func (h *ModuleHook) PrepareTmpFilesForHookRun(bindingContext []byte) (tmpFiles map[string]string, err error)
- func (h *ModuleHook) Run(bindingType BindingType, context []BindingContext, logLabels map[string]string, ...) error
- func (m *ModuleHook) WithConfig(configOutput []byte) (err error)
- func (m *ModuleHook) WithGoConfig(config *go_hook.HookConfig) (err error)
- func (m *ModuleHook) WithModule(module *Module)
- type ModuleHookConfig
- func (c *ModuleHookConfig) Bindings() []BindingType
- func (c *ModuleHookConfig) BindingsCount() int
- func (c *ModuleHookConfig) ConvertAfterDeleteHelm(value interface{}) (*AfterDeleteHelmConfig, error)
- func (c *ModuleHookConfig) ConvertAfterHelm(value interface{}) (*AfterHelmConfig, error)
- func (c *ModuleHookConfig) ConvertAndCheck(data []byte) error
- func (c *ModuleHookConfig) ConvertAndCheckV0() (err error)
- func (c *ModuleHookConfig) ConvertAndCheckV1() (err error)
- func (c *ModuleHookConfig) ConvertBeforeHelm(value interface{}) (*BeforeHelmConfig, error)
- func (c *ModuleHookConfig) HasBinding(binding BindingType) bool
- func (c *ModuleHookConfig) LoadAndValidate(data []byte) error
- type ModuleHookConfigV0
- type ModuleManager
- type ModuleState
- type ModulesState
- type ValuesTransform
- type ValuesTransformer
Constants ¶
This section is empty.
Variables ¶
var ValidModuleNameRe = regexp.MustCompile(`^[0-9][0-9][0-9]-(.*)$`)
Functions ¶
func CreateEmptyWritableFile ¶
func NewHookConfigFromGoConfig ¶
func NewHookConfigFromGoConfig(input *go_hook.HookConfig) (config.HookConfig, error)
func NewMainModuleManager ¶
func NewMainModuleManager() *moduleManager
NewMainModuleManager returns new MainModuleManager
func ReadOpenAPIFiles ¶
/global/openapi/config-values.yaml /global/openapi/values.yaml /modules/XXXX/openapi/config-values.yaml /modules/XXXX/openapi/values.yaml
Types ¶
type AfterAllConfig ¶
type AfterAllConfig struct { CommonBindingConfig Order float64 }
type AfterDeleteHelmConfig ¶
type AfterDeleteHelmConfig struct { CommonBindingConfig Order float64 }
type AfterHelmConfig ¶
type AfterHelmConfig struct { CommonBindingConfig Order float64 }
type ApplyDefaultsForGlobal ¶
type ApplyDefaultsForGlobal struct { SchemaType validation.SchemaType ValuesValidator *validation.ValuesValidator }
type ApplyDefaultsForModule ¶
type ApplyDefaultsForModule struct { ModuleValuesKey string SchemaType validation.SchemaType ValuesValidator *validation.ValuesValidator }
type BeforeAllConfig ¶
type BeforeAllConfig struct { CommonBindingConfig Order float64 }
type BeforeHelmConfig ¶
type BeforeHelmConfig struct { CommonBindingConfig Order float64 }
type ChangeType ¶
type ChangeType string
ChangeType are types of module changes.
const ( // All other types are deprecated. This const can be removed in future versions. // Module values are changed Changed ChangeType = "MODULE_CHANGED" )
type CommonHook ¶
type CommonHook struct { hook.Hook KubernetesBindingSynchronizationState map[string]*KubernetesBindingSynchronizationState GoHook go_hook.GoHook // contains filtered or unexported fields }
func (*CommonHook) GetGoHook ¶
func (h *CommonHook) GetGoHook() go_hook.GoHook
func (*CommonHook) GetName ¶
func (h *CommonHook) GetName() string
func (*CommonHook) GetPath ¶
func (h *CommonHook) GetPath() string
func (*CommonHook) SynchronizationDone ¶
func (h *CommonHook) SynchronizationDone() bool
SynchronizationDone is true if all KubernetesBindingSynchronizationState objects has true for Done.
func (*CommonHook) SynchronizationNeeded ¶
func (h *CommonHook) SynchronizationNeeded() bool
SynchronizationNeeded is true if there is binding with executeHookOnSynchronization.
func (*CommonHook) SynchronizationQueued ¶
func (h *CommonHook) SynchronizationQueued() bool
SynchronizationQueued is true if at least one KubernetesBindingSynchronizationState object has true for Queued.
func (*CommonHook) WithGoHook ¶
func (c *CommonHook) WithGoHook(h go_hook.GoHook)
func (*CommonHook) WithModuleManager ¶
func (c *CommonHook) WithModuleManager(moduleManager *moduleManager)
type Event ¶
type Event struct { ModulesChanges []ModuleChange Type EventType }
Event is used to send module events to the main loop.
type GlobalHook ¶
type GlobalHook struct { *CommonHook Config *GlobalHookConfig }
func NewGlobalHook ¶
func NewGlobalHook(name, path string) *GlobalHook
func SearchGlobalGoHooks ¶
func SearchGlobalGoHooks() (hooks []*GlobalHook, err error)
func SearchGlobalHooks ¶
func SearchGlobalHooks(hooksDir string) (hooks []*GlobalHook, err error)
SearchGlobalHooks recursively find all executables in hooksDir. Absent hooksDir is not an error.
func SearchGlobalShellHooks ¶
func SearchGlobalShellHooks(hooksDir string) (hooks []*GlobalHook, err error)
SearchGlobalHooks recursively find all executables in hooksDir. Absent hooksDir is not an error.
func (*GlobalHook) GetConfigDescription ¶
func (gh *GlobalHook) GetConfigDescription() string
func (*GlobalHook) GetConfigValues ¶
func (h *GlobalHook) GetConfigValues() utils.Values
func (*GlobalHook) Order ¶
func (g *GlobalHook) Order(binding BindingType) float64
Order return float order number for bindings with order.
func (*GlobalHook) PrepareTmpFilesForHookRun ¶
func (h *GlobalHook) PrepareTmpFilesForHookRun(bindingContext []byte) (tmpFiles map[string]string, err error)
PrepareTmpFilesForHookRun creates temporary files for hook and returns environment variables with paths
func (*GlobalHook) Run ¶
func (h *GlobalHook) Run(bindingType BindingType, bindingContext []BindingContext, logLabels map[string]string) error
func (*GlobalHook) WithConfig ¶
func (g *GlobalHook) WithConfig(configOutput []byte) (err error)
func (*GlobalHook) WithGoConfig ¶
func (g *GlobalHook) WithGoConfig(config *go_hook.HookConfig) (err error)
type GlobalHookConfig ¶
type GlobalHookConfig struct { config.HookConfig // versioned raw config values GlobalV0 *GlobalHookConfigV0 GlobalV1 *GlobalHookConfigV0 // effective config values BeforeAll *BeforeAllConfig AfterAll *AfterAllConfig }
GlobalHookConfig is a structure with versioned hook configuration
func NewGlobalHookConfigFromGoConfig ¶
func NewGlobalHookConfigFromGoConfig(input *go_hook.HookConfig) (*GlobalHookConfig, error)
func (*GlobalHookConfig) Bindings ¶
func (c *GlobalHookConfig) Bindings() []BindingType
func (*GlobalHookConfig) BindingsCount ¶
func (c *GlobalHookConfig) BindingsCount() int
func (*GlobalHookConfig) ConvertAfterAll ¶
func (c *GlobalHookConfig) ConvertAfterAll(value interface{}) (*AfterAllConfig, error)
func (*GlobalHookConfig) ConvertAndCheck ¶
func (c *GlobalHookConfig) ConvertAndCheck(data []byte) error
func (*GlobalHookConfig) ConvertAndCheckV0 ¶
func (c *GlobalHookConfig) ConvertAndCheckV0() (err error)
func (*GlobalHookConfig) ConvertAndCheckV1 ¶
func (c *GlobalHookConfig) ConvertAndCheckV1() (err error)
func (*GlobalHookConfig) ConvertBeforeAll ¶
func (c *GlobalHookConfig) ConvertBeforeAll(value interface{}) (*BeforeAllConfig, error)
func (*GlobalHookConfig) HasBinding ¶
func (c *GlobalHookConfig) HasBinding(binding BindingType) bool
func (*GlobalHookConfig) LoadAndValidate ¶
func (c *GlobalHookConfig) LoadAndValidate(data []byte) error
LoadAndValidate loads config from bytes and validate it. Returns multierror.
type GlobalHookConfigV0 ¶
type GlobalHookConfigV0 struct { BeforeAll interface{} `json:"beforeAll"` AfterAll interface{} `json:"afterAll"` }
type Hook ¶
type Hook interface { WithModuleManager(moduleManager *moduleManager) WithConfig(configOutput []byte) (err error) WithGoConfig(config *go_hook.HookConfig) (err error) WithHookController(hookController controller.HookController) GetName() string GetPath() string GetGoHook() go_hook.GoHook GetValues() (utils.Values, error) GetConfigValues() utils.Values PrepareTmpFilesForHookRun(bindingContext []byte) (map[string]string, error) Order(binding sh_op_types.BindingType) float64 }
type HookExecutor ¶
type HookExecutor struct { Hook Hook Context []BindingContext ConfigVersion string ConfigValuesPath string ValuesPath string ContextPath string ConfigValuesPatchPath string ValuesPatchPath string MetricsPath string ObjectPatcher *object_patch.ObjectPatcher KubernetesPatchPath string LogLabels map[string]string }
func NewHookExecutor ¶
func NewHookExecutor(h Hook, context []BindingContext, configVersion string, objectPatcher *object_patch.ObjectPatcher) *HookExecutor
func (*HookExecutor) Config ¶
func (e *HookExecutor) Config() (configOutput []byte, err error)
func (*HookExecutor) Run ¶
func (e *HookExecutor) Run() (result *HookResult, err error)
func (*HookExecutor) RunGoHook ¶
func (e *HookExecutor) RunGoHook() (result *HookResult, err error)
func (*HookExecutor) WithLogLabels ¶
func (e *HookExecutor) WithLogLabels(logLabels map[string]string)
type HookResult ¶
type HookResult struct { Usage *executor.CmdUsage Patches map[utils.ValuesPatchType]*utils.ValuesPatch Metrics []metric_operation.MetricOperation ObjectPatcherOperations []object_patch.Operation BindingActions []go_hook.BindingAction }
type KubernetesBindingSynchronizationState ¶
func (*KubernetesBindingSynchronizationState) String ¶
func (k *KubernetesBindingSynchronizationState) String() string
type Module ¶
type Module struct { Name string Path string // module values from modules/values.yaml file CommonStaticConfig *utils.ModuleConfig // module values from modules/<module name>/values.yaml StaticConfig *utils.ModuleConfig LastReleaseManifests []manifest.Manifest State *ModuleState // There was a successful Run() without values changes IsReady bool // contains filtered or unexported fields }
func SearchModules ¶
func (*Module) ConfigValues ¶
ConfigValues returns raw values from ConfigMap: - global section - module section
func (*Module) Delete ¶
Delete removes helm release if it exists and runs afterDeleteHelm hooks. It is a handler for MODULE_DELETE task.
func (*Module) PrepareValuesYamlFile ¶
values.yaml for helm
func (*Module) Run ¶
Run is a phase of module lifecycle that runs onStartup and beforeHelm hooks, helm upgrade --install command and afterHelm hook. It is a handler of task MODULE_RUN
func (*Module) RunOnStartup ¶
Run is a phase of module lifecycle that runs onStartup and beforeHelm hooks, helm upgrade --install command and afterHelm hook. It is a handler of task MODULE_RUN
func (*Module) ShouldRunHelmUpgrade ¶
func (m *Module) ShouldRunHelmUpgrade(helmClient client.HelmClient, releaseName string, checksum string, manifests []manifest.Manifest, logLabels map[string]string) (bool, error)
ShouldRunHelmUpgrade tells if there is a case to run `helm upgrade`:
- Helm chart in not installed yet.
- Last release has FAILED status.
- Checksum in release values not equals to checksum argument.
- Some resources installed previously are missing.
If all these conditions aren't met, helm upgrade can be skipped.
func (*Module) StaticAndConfigValues ¶
StaticAndConfigValues returns global common static values defined in various values.yaml files and in a ConfigMap and module values defined in various values.yaml files and in a ConfigMap.
func (*Module) StaticAndNewValues ¶
StaticAndNewValues returns global values defined in various values.yaml files and in a ConfigMap and module values defined in various values.yaml files merged with newValues.
func (*Module) SynchronizationDone ¶
SynchronizationDone is true if all kubernetes.Synchronization bindings in all hooks are done.
func (*Module) SynchronizationNeeded ¶
SynchronizationNeeded is true if module has at least one kubernetes hook with executeHookOnSynchronization.
func (*Module) SynchronizationQueued ¶
SynchronizationQueued is true if at least one hook has queued kubernetes.Synchronization binding.
func (*Module) Values ¶
Values returns effective values for module hook or helm chart:
global section: static + config + defaults + patches from hooks
module section: static + config + defaults + patches from hooks
func (*Module) ValuesForEnabledScript ¶
ValuesForEnabledScript returns effective values for enabled script. There is enabledModules key in global section with previously enabled modules.
func (*Module) ValuesPatches ¶
func (m *Module) ValuesPatches() []utils.ValuesPatch
func (*Module) WithMetricStorage ¶
func (m *Module) WithMetricStorage(mstor *metric_storage.MetricStorage)
func (*Module) WithModuleManager ¶
func (m *Module) WithModuleManager(moduleManager *moduleManager)
type ModuleChange ¶
type ModuleChange struct { Name string ChangeType ChangeType }
ModuleChange contains module name and type of module changes.
type ModuleHook ¶
type ModuleHook struct { *CommonHook Module *Module Config *ModuleHookConfig }
func NewModuleHook ¶
func NewModuleHook(name, path string) *ModuleHook
func SearchModuleGoHooks ¶
func SearchModuleGoHooks(module *Module) (hooks []*ModuleHook, err error)
func SearchModuleHooks ¶
func SearchModuleHooks(module *Module) (hooks []*ModuleHook, err error)
func SearchModuleShellHooks ¶
func SearchModuleShellHooks(module *Module) (hooks []*ModuleHook, err error)
func (*ModuleHook) GetConfigDescription ¶
func (m *ModuleHook) GetConfigDescription() string
func (*ModuleHook) GetConfigValues ¶
func (h *ModuleHook) GetConfigValues() utils.Values
func (*ModuleHook) Order ¶
func (m *ModuleHook) Order(binding BindingType) float64
Order return float order number for bindings with order.
func (*ModuleHook) PrepareTmpFilesForHookRun ¶
func (h *ModuleHook) PrepareTmpFilesForHookRun(bindingContext []byte) (tmpFiles map[string]string, err error)
PrepareTmpFilesForHookRun creates temporary files for hook and returns environment variables with paths
func (*ModuleHook) WithConfig ¶
func (m *ModuleHook) WithConfig(configOutput []byte) (err error)
func (*ModuleHook) WithGoConfig ¶
func (m *ModuleHook) WithGoConfig(config *go_hook.HookConfig) (err error)
func (*ModuleHook) WithModule ¶
func (m *ModuleHook) WithModule(module *Module)
type ModuleHookConfig ¶
type ModuleHookConfig struct { config.HookConfig // versioned raw config values ModuleV0 *ModuleHookConfigV0 ModuleV1 *ModuleHookConfigV0 // effective config values BeforeHelm *BeforeHelmConfig AfterHelm *AfterHelmConfig AfterDeleteHelm *AfterDeleteHelmConfig }
ModuleHookConfig is a structure with versioned hook configuration
func NewModuleHookConfigFromGoConfig ¶
func NewModuleHookConfigFromGoConfig(input *go_hook.HookConfig) (*ModuleHookConfig, error)
func (*ModuleHookConfig) Bindings ¶
func (c *ModuleHookConfig) Bindings() []BindingType
func (*ModuleHookConfig) BindingsCount ¶
func (c *ModuleHookConfig) BindingsCount() int
func (*ModuleHookConfig) ConvertAfterDeleteHelm ¶
func (c *ModuleHookConfig) ConvertAfterDeleteHelm(value interface{}) (*AfterDeleteHelmConfig, error)
func (*ModuleHookConfig) ConvertAfterHelm ¶
func (c *ModuleHookConfig) ConvertAfterHelm(value interface{}) (*AfterHelmConfig, error)
func (*ModuleHookConfig) ConvertAndCheck ¶
func (c *ModuleHookConfig) ConvertAndCheck(data []byte) error
func (*ModuleHookConfig) ConvertAndCheckV0 ¶
func (c *ModuleHookConfig) ConvertAndCheckV0() (err error)
func (*ModuleHookConfig) ConvertAndCheckV1 ¶
func (c *ModuleHookConfig) ConvertAndCheckV1() (err error)
func (*ModuleHookConfig) ConvertBeforeHelm ¶
func (c *ModuleHookConfig) ConvertBeforeHelm(value interface{}) (*BeforeHelmConfig, error)
func (*ModuleHookConfig) HasBinding ¶
func (c *ModuleHookConfig) HasBinding(binding BindingType) bool
func (*ModuleHookConfig) LoadAndValidate ¶
func (c *ModuleHookConfig) LoadAndValidate(data []byte) error
LoadAndValidate loads config from bytes and validate it. Returns multierror.
type ModuleHookConfigV0 ¶
type ModuleHookConfigV0 struct { BeforeHelm interface{} `json:"beforeHelm"` AfterHelm interface{} `json:"afterHelm"` AfterDeleteHelm interface{} `json:"afterDeleteHelm"` }
type ModuleManager ¶
type ModuleManager interface { Init() error Start() Ch() chan Event // Dependencies WithContext(ctx context.Context) WithDirectories(modulesDir string, globalHooksDir string, tempDir string) ModuleManager WithKubeEventManager(kube_events_manager.KubeEventsManager) WithKubeObjectPatcher(*object_patch.ObjectPatcher) WithScheduleManager(schedule_manager.ScheduleManager) WithKubeConfigManager(kubeConfigManager kube_config_manager.KubeConfigManager) ModuleManager WithHelmResourcesManager(manager helm_resources_manager.HelmResourcesManager) WithMetricStorage(storage *metric_storage.MetricStorage) WithHookMetricStorage(storage *metric_storage.MetricStorage) GetGlobalHooksInOrder(bindingType BindingType) []string GetGlobalHook(name string) *GlobalHook GetModuleNamesInOrder() []string GetModule(name string) *Module GetModuleHookNames(moduleName string) []string GetModuleHook(name string) *ModuleHook GetModuleHooksInOrder(moduleName string, bindingType BindingType) []string GlobalStaticAndConfigValues() utils.Values GlobalStaticAndNewValues(newValues utils.Values) utils.Values GlobalConfigValues() utils.Values GlobalValues() (utils.Values, error) GlobalValuesPatches() []utils.ValuesPatch UpdateGlobalConfigValues(configValues utils.Values) UpdateGlobalDynamicValuesPatches(valuesPatch utils.ValuesPatch) UpdateModuleConfigValues(moduleName string, configValues utils.Values) UpdateModuleDynamicValuesPatches(moduleName string, valuesPatch utils.ValuesPatch) // Actions for tasks DiscoverModulesState(logLabels map[string]string) (*ModulesState, error) DeleteModule(moduleName string, logLabels map[string]string) error RunModule(moduleName string, onStartup bool, logLabels map[string]string, afterStartupCb func() error) (bool, error) RunGlobalHook(hookName string, binding BindingType, bindingContext []BindingContext, logLabels map[string]string) (beforeChecksum string, afterChecksum string, err error) RunModuleHook(hookName string, binding BindingType, bindingContext []BindingContext, logLabels map[string]string) error Retry() RegisterModuleHooks(module *Module, logLabels map[string]string) error HandleKubeEvent(kubeEvent KubeEvent, createGlobalTaskFn func(*GlobalHook, controller.BindingExecutionInfo), createModuleTaskFn func(*Module, *ModuleHook, controller.BindingExecutionInfo)) HandleGlobalEnableKubernetesBindings(hookName string, createTaskFn func(*GlobalHook, controller.BindingExecutionInfo)) error HandleModuleEnableKubernetesBindings(hookName string, createTaskFn func(*ModuleHook, controller.BindingExecutionInfo)) error StartModuleHooks(moduleName string) //EnableScheduleBindings() DisableModuleHooks(moduleName string) HandleScheduleEvent(crontab string, createGlobalTaskFn func(*GlobalHook, controller.BindingExecutionInfo), createModuleTaskFn func(*Module, *ModuleHook, controller.BindingExecutionInfo)) error DynamicEnabledChecksum() string ApplyEnabledPatch(enabledPatch utils.ValuesPatch) error GlobalSynchronizationNeeded() bool GlobalSynchronizationDone() bool SynchronizationQueued(id string) SynchronizationDone(id string) DumpState() }
type ModuleState ¶
type ModuleState struct { // OnStartupDone bool SynchronizationTasksQueued bool ShouldWaitForSynchronization bool WaitStarted bool // become true if no synchronization task is needed or when queued synchronization tasks are finished SynchronizationDone bool // flag to prevent excess monitor starts MonitorsStarted bool }
type ModulesState ¶
type ModulesState struct { // modules that should be run EnabledModules []string // modules that should be deleted ModulesToDisable []string // modules that should be purged ReleasedUnknownModules []string // modules that was disabled and now are enabled NewlyEnabledModules []string }
ModulesState is a result of Discovery process, that determines which modules should be enabled, disabled or purged.