Documentation ¶
Index ¶
- Constants
- func Init()
- func RegisterWorkFlow(workflowName string, workflow Workflow)
- type BuildTaskRequest
- type RunTaskRequest
- type StepStatus
- type Task
- type TaskHandler
- func (h *TaskHandler) GetLogs(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) GetTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) Register(m *mux.Router)
- func (h *TaskHandler) RestartTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) StreamLogs(w http.ResponseWriter, r *http.Request)
- type TaskResponse
- type TaskType
- type Workflow
- type WorkflowSet
Constants ¶
View Source
const ( MasterTask = "master" NodeTask = "node" ClusterTask = "cluster" PreProvisionTask = "preprovision" ImportTask = "import" )
View Source
const ( Prefix = "tasks" PostProvision = "PostProvision" PreProvision = "PreProvision" ProvisionMaster = "ProvisionMaster" ProvisionNode = "ProvisionNode" DeleteNode = "DeleteNode" DeleteCluster = "DeleteCluster" ImportCluster = "ImportCluster" )
Variables ¶
This section is empty.
Functions ¶
func RegisterWorkFlow ¶
Types ¶
type BuildTaskRequest ¶
type RunTaskRequest ¶
type StepStatus ¶
type StepStatus struct { Status statuses.Status `json:"status"` StepName string `json:"stepName"` ErrMsg string `json:"errorMessage"` }
StepStatus aggregates data that is needed to track progress of step to persistent storage.
type Task ¶
type Task struct { ID string `json:"id"` Type string `json:"type"` Config *steps.Config `json:"config"` Status statuses.Status `json:"status"` StepStatuses []StepStatus `json:"stepsStatuses"` // contains filtered or unexported fields }
Task is an entity that has it own state that can be tracked and written to persistent storage through repository, it executes particular workflow of steps.
func DeserializeTask ¶
type TaskHandler ¶
type TaskHandler struct {
// contains filtered or unexported fields
}
func NewTaskHandler ¶
func (*TaskHandler) GetLogs ¶
func (h *TaskHandler) GetLogs(w http.ResponseWriter, r *http.Request)
NOTE(stgleb): This is made for testing purposes and example, remove when UI is done.
func (*TaskHandler) GetTask ¶
func (h *TaskHandler) GetTask(w http.ResponseWriter, r *http.Request)
func (*TaskHandler) Register ¶
func (h *TaskHandler) Register(m *mux.Router)
func (*TaskHandler) RestartTask ¶
func (h *TaskHandler) RestartTask(w http.ResponseWriter, r *http.Request)
func (*TaskHandler) StreamLogs ¶
func (h *TaskHandler) StreamLogs(w http.ResponseWriter, r *http.Request)
type TaskResponse ¶
type TaskResponse struct {
ID string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.