convergemodules

package
v1.15.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskHandler

func RegisterTaskHandler(deps TaskDependencies) func(t sh_task.Task, logger *log.Logger) task.Task

RegisterTaskHandler creates a factory function that instantiates ConvergeModules tasks.

Types

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task handles module convergence operations.

func NewTask

func NewTask(
	shellTask sh_task.Task,
	moduleManager *module_manager.ModuleManager,
	metricStorage metricsstorage.Storage,
	convergeState *converge.ConvergeState,
	functionalScheduler *functional.Scheduler,
	queueService *taskqueue.Service,
	logger *log.Logger,
) *Task

NewTask creates a new module convergence task handler.

func (*Task) CreateAfterAllTasks

func (s *Task) CreateAfterAllTasks(logLabels map[string]string, eventDescription string) ([]sh_task.Task, error)

CreateAfterAllTasks returns tasks to run AfterAll global hooks.

func (*Task) CreateBeforeAllTasks

func (s *Task) CreateBeforeAllTasks(logLabels map[string]string, eventDescription string) []sh_task.Task

CreateBeforeAllTasks returns tasks to run BeforeAll global hooks.

func (*Task) CreateConvergeModulesTasks

func (s *Task) CreateConvergeModulesTasks(state *module_manager.ModulesState, logLabels map[string]string, eventDescription string,
) []sh_task.Task

CreateConvergeModulesTasks creates tasks for module lifecycle management based on the current state. It generates: - ModuleEnsureCRDs tasks for modules that need CRD installation - ModuleDelete tasks for modules that need to be disabled - ModuleRun tasks for individual modules that need to be enabled or rerun - ParallelModuleRun tasks for groups of modules that can be processed in parallel

func (*Task) Handle

func (s *Task) Handle(ctx context.Context) queue.TaskResult

Handle is a multi-phase task.

func (*Task) IsStartupConvergeDone

func (s *Task) IsStartupConvergeDone() bool

type TaskDependencies

type TaskDependencies interface {
	GetModuleManager() *module_manager.ModuleManager
	GetMetricStorage() metricsstorage.Storage
	GetConvergeState() *converge.ConvergeState
	GetQueueService() *taskqueue.Service
	GetFunctionalScheduler() *functional.Scheduler
}

TaskDependencies defines the external dependencies required by the ConvergeModules task.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL