Skip to content

Commit 5b79f68

Browse files
author
Pavel Okhlopkov
committed
bump names
Signed-off-by: Pavel Okhlopkov <[email protected]>
1 parent f5efca1 commit 5b79f68

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/hook/controller/hook_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (hc *HookController) HandleKubeEvent(event kemtypes.KubeEvent, handlerFunc
171171
}
172172
}
173173

174-
func (hc *HookController) HandleCreateTaskFromKubeEvent(event kemtypes.KubeEvent, createTasksFn func(BindingExecutionInfo) task.Task) task.Task {
174+
func (hc *HookController) HandleKubeEventWithFormTask(event kemtypes.KubeEvent, createTasksFn func(BindingExecutionInfo) task.Task) task.Task {
175175
if hc.KubernetesController != nil {
176176
execInfo := hc.KubernetesController.HandleEvent(event)
177177
if createTasksFn != nil {
@@ -217,7 +217,7 @@ func (hc *HookController) HandleScheduleEvent(crontab string, handlerFunc func(B
217217
}
218218
}
219219

220-
func (hc *HookController) HandleCreateTasksFromScheduleEvent(crontab string, createTasksFn func(BindingExecutionInfo) task.Task) []task.Task {
220+
func (hc *HookController) HandleScheduleEventWithFormTasks(crontab string, createTasksFn func(BindingExecutionInfo) task.Task) []task.Task {
221221
if hc.ScheduleController == nil {
222222
return nil
223223
}

pkg/hook/hook_manager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ func (hm *Manager) GetHooksInOrder(bindingType htypes.BindingType) ([]string, er
285285
return hooksNames, nil
286286
}
287287

288-
func (hm *Manager) HandleCreateTasksFromKubeEvent(kubeEvent kemtypes.KubeEvent, createTaskFn func(*Hook, controller.BindingExecutionInfo) task.Task) []task.Task {
288+
func (hm *Manager) CreateTasksFromKubeEvent(kubeEvent kemtypes.KubeEvent, createTaskFn func(*Hook, controller.BindingExecutionInfo) task.Task) []task.Task {
289289
kubeHooks, _ := hm.GetHooksInOrder(htypes.OnKubernetesEvent)
290290
tasks := make([]task.Task, 0)
291291

292292
for _, hookName := range kubeHooks {
293293
h := hm.GetHook(hookName)
294294

295295
if h.HookController.CanHandleKubeEvent(kubeEvent) {
296-
task := h.HookController.HandleCreateTaskFromKubeEvent(kubeEvent, func(info controller.BindingExecutionInfo) task.Task {
296+
task := h.HookController.HandleKubeEventWithFormTask(kubeEvent, func(info controller.BindingExecutionInfo) task.Task {
297297
if createTaskFn != nil {
298298
return createTaskFn(h, info)
299299
}
@@ -317,7 +317,7 @@ func (hm *Manager) HandleCreateTasksFromScheduleEvent(crontab string, createTask
317317
for _, hookName := range schHooks {
318318
h := hm.GetHook(hookName)
319319
if h.HookController.CanHandleScheduleEvent(crontab) {
320-
newTasks := h.HookController.HandleCreateTasksFromScheduleEvent(crontab, func(info controller.BindingExecutionInfo) task.Task {
320+
newTasks := h.HookController.HandleScheduleEventWithFormTasks(crontab, func(info controller.BindingExecutionInfo) task.Task {
321321
if createTaskFn != nil {
322322
return createTaskFn(h, info)
323323
}

pkg/shell-operator/operator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (op *ShellOperator) initHookManager() error {
139139
logEntry := utils.EnrichLoggerWithLabels(op.logger, logLabels)
140140
logEntry.Debug("Create tasks for 'kubernetes' event", slog.String("name", kubeEvent.String()))
141141

142-
return op.HookManager.HandleCreateTasksFromKubeEvent(kubeEvent, func(hook *hook.Hook, info controller.BindingExecutionInfo) task.Task {
142+
return op.HookManager.CreateTasksFromKubeEvent(kubeEvent, func(hook *hook.Hook, info controller.BindingExecutionInfo) task.Task {
143143
newTask := task.NewTask(task_metadata.HookRun).
144144
WithMetadata(task_metadata.HookMetadata{
145145
HookName: hook.Name,

0 commit comments

Comments
 (0)