service

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 36 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvergeModulesInQueue

func ConvergeModulesInQueue(q *queue.TaskQueue) int

func ConvergeTasksInQueue

func ConvergeTasksInQueue(q *queue.TaskQueue) int

Types

type TaskHandlerService

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

func NewTaskHandlerService

func NewTaskHandlerService(ctx context.Context, config *TaskHandlerServiceConfig, logger *log.Logger) *TaskHandlerService

NewTaskHandlerService creates a new task handler service

func (*TaskHandlerService) CheckConvergeStatus

func (s *TaskHandlerService) CheckConvergeStatus(t sh_task.Task)

CheckConvergeStatus monitors the convergence process and updates metrics. It detects when convergence starts and completes, tracks timing metrics, and keeps track of the first convergence for operator readiness.

func (*TaskHandlerService) GetCRDExtraLabels

func (s *TaskHandlerService) GetCRDExtraLabels() map[string]string

func (*TaskHandlerService) GetConvergeState

func (s *TaskHandlerService) GetConvergeState() *converge.ConvergeState

func (*TaskHandlerService) GetDiscoveredGVKs added in v1.7.5

func (s *TaskHandlerService) GetDiscoveredGVKs() *discovercrds.DiscoveredGVKs

func (*TaskHandlerService) GetHelm

func (s *TaskHandlerService) GetHelm() *helm.ClientFactory

func (*TaskHandlerService) GetHelmResourcesManager

func (s *TaskHandlerService) GetHelmResourcesManager() helm_resources_manager.HelmResourcesManager

func (*TaskHandlerService) GetKubeClient

func (s *TaskHandlerService) GetKubeClient() *klient.Client

func (*TaskHandlerService) GetKubeConfigManager

func (s *TaskHandlerService) GetKubeConfigManager() *kube_config_manager.KubeConfigManager

func (*TaskHandlerService) GetMetricStorage

func (s *TaskHandlerService) GetMetricStorage() metric.Storage

func (*TaskHandlerService) GetModuleManager

func (s *TaskHandlerService) GetModuleManager() *module_manager.ModuleManager

func (*TaskHandlerService) GetParallelTaskChannels

func (s *TaskHandlerService) GetParallelTaskChannels() *paralleltask.TaskChannels

func (*TaskHandlerService) GetQueueService

func (s *TaskHandlerService) GetQueueService() *taskqueue.Service

func (*TaskHandlerService) GetTaskFactory

func (s *TaskHandlerService) GetTaskFactory() map[sh_task.TaskType]func(t sh_task.Task, logger *log.Logger) task.Task

func (*TaskHandlerService) Handle

TaskHandler handles tasks in queue.

func (*TaskHandlerService) ParallelHandle

func (s *TaskHandlerService) ParallelHandle(ctx context.Context, t sh_task.Task) queue.TaskResult

ParallelHandle handles limited types of tasks in parallel queues.

func (*TaskHandlerService) UpdateFirstConvergeStatus

func (s *TaskHandlerService) UpdateFirstConvergeStatus(convergeTasks int)

UpdateFirstConvergeStatus tracks the progress of the first convergence operation and logs when it completes.

func (*TaskHandlerService) UpdateWaitInQueueMetric

func (s *TaskHandlerService) UpdateWaitInQueueMetric(t sh_task.Task)

UpdateWaitInQueueMetric increases task_wait_in_queue_seconds_total counter for the task type. TODO pass queue name from handler, not from task

type TaskHandlerServiceConfig

type TaskHandlerServiceConfig struct {
	Engine               *shell_operator.ShellOperator
	ParallelTaskChannels *paralleltask.TaskChannels
	Helm                 *helm.ClientFactory
	HelmResourcesManager helm_resources_manager.HelmResourcesManager
	ModuleManager        *module_manager.ModuleManager
	MetricStorage        metric.Storage
	KubeConfigManager    *kube_config_manager.KubeConfigManager
	ConvergeState        *converge.ConvergeState
	CRDExtraLabels       map[string]string
}

Jump to

Keyboard shortcuts

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