From 89b4ba9cc826b00d6e79fe25210e802141e0483b Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Mon, 16 Jul 2018 17:40:04 -0700 Subject: [PATCH] comments --- client/allocrunnerv2/interfaces/task_lifecycle.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/allocrunnerv2/interfaces/task_lifecycle.go b/client/allocrunnerv2/interfaces/task_lifecycle.go index c0a11ee71..95393b5f3 100644 --- a/client/allocrunnerv2/interfaces/task_lifecycle.go +++ b/client/allocrunnerv2/interfaces/task_lifecycle.go @@ -54,6 +54,8 @@ type TaskPrestartResponse struct { type TaskPrestartHook interface { TaskHook + + // Prestart is called before the task is started. Prestart(context.Context, *TaskPrestartRequest, *TaskPrestartResponse) error } @@ -64,6 +66,8 @@ type TaskPoststartResponse struct{} type TaskPoststartHook interface { TaskHook + + // Poststart is called after the task has started. Poststart(context.Context, *TaskPoststartRequest, *TaskPoststartResponse) error } @@ -72,6 +76,8 @@ type TaskKillResponse struct{} type TaskKillHook interface { TaskHook + + // Kill is called when a task is going to be killed. Kill(context.Context, *TaskKillRequest, *TaskKillResponse) error } @@ -80,6 +86,8 @@ type TaskExitedResponse struct{} type TaskExitedHook interface { TaskHook + + // Exited is called when a task exits and may or may not be restarted. Exited(context.Context, *TaskExitedRequest, *TaskExitedResponse) error } @@ -98,5 +106,7 @@ type TaskStopResponse struct{} type TaskStopHook interface { TaskHook + + // Stop is called after the task has exited and will not be started again. Stop(context.Context, *TaskStopRequest, *TaskStopResponse) error }