Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) AddLastTaskToMain(t sh_task.Task) error
- func (s *Service) AddLastTaskToQueue(queueName string, t sh_task.Task) error
- func (s *Service) CombineBindingContextForHook(queueName string, t sh_task.Task, stopCombineFn func(tsk sh_task.Task) bool) *shell_operator.CombineResult
- func (s *Service) CreateAndStartQueue(queueName string)
- func (s *Service) DrainNonMainQueue(queueName string)
- func (s *Service) GetNumberOfConvergeTasks() int
- func (s *Service) IsQueueExists(queueName string) bool
- func (s *Service) MainQueueHasPendingModuleRunTask(moduleName string) bool
- func (s *Service) ModuleEnsureCRDsTasksInMainQueueAfterId(afterId string) bool
- func (s *Service) RemoveAdjacentConvergeModules(queueName string, afterId string)
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQueueNotFound = errors.New("queue is not found")
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
Handle func(ctx context.Context, t sh_task.Task) queue.TaskResult
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AddLastTaskToQueue ¶
func (*Service) CombineBindingContextForHook ¶
func (s *Service) CombineBindingContextForHook(queueName string, t sh_task.Task, stopCombineFn func(tsk sh_task.Task) bool) *shell_operator.CombineResult
func (*Service) CreateAndStartQueue ¶
CreateAndStartQueue creates a named queue with default handler and starts it. It returns false is queue is already created
func (*Service) DrainNonMainQueue ¶
func (*Service) GetNumberOfConvergeTasks ¶
func (*Service) IsQueueExists ¶
IsQueueExists returns true is queue is already created
func (*Service) MainQueueHasPendingModuleRunTask ¶
queueHasPendingModuleRunTask returns true if queue has pending tasks with the type "ModuleRun" related to the module "moduleName".
func (*Service) ModuleEnsureCRDsTasksInMainQueueAfterId ¶
func (*Service) RemoveAdjacentConvergeModules ¶
RemoveAdjacentConvergeModules removes ConvergeModules tasks right after the task with the specified ID.
type ServiceConfig ¶
type ServiceConfig struct {
Engine *shell_operator.ShellOperator
Handle func(ctx context.Context, t sh_task.Task) queue.TaskResult
}
Click to show internal directories.
Click to hide internal directories.