Documentation ¶
Index ¶
- Constants
- func Init()
- func RegisterWorkFlow(workflowName string, workflow Workflow)
- type BuildTaskRequest
- type RunTaskRequest
- type StepStatus
- type Task
- type TaskHandler
- func (h *TaskHandler) BuildAndRunTask(w http.ResponseWriter, r *http.Request)
- 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) RunTask(w http.ResponseWriter, r *http.Request)
- func (h *TaskHandler) StreamLogs(w http.ResponseWriter, r *http.Request)
- type TaskResponse
- type Workflow
- type WorkflowSet
Constants ¶
View Source
const ( Prefix = "tasks" Cluster = "Cluster" DigitalOceanMaster = "DigitalOceanMaster" DigitalOceanNode = "DigitalOceanNode" DigitalOceanDeleteNode = "DigitalOceanDeleteNode" DigitalOceanDeleteCluster = "DigitalOceanDeleteCluster" AWSMaster = "AWSMaster" AWSNode = "AWSNode" AWSPreProvision = "AWSPreProvisionCluster" AWSDeleteCluster = "AWSDeleteCluster" AWSDeleteNode = "AWSDeleteNode" GCEMaster = "GCEMaster" GCENode = "GCENode" GCEDeleteCluster = "GCEDeleteCluster" GCEDeleteNode = "GCEDeleteNode" )
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) BuildAndRunTask ¶
func (h *TaskHandler) BuildAndRunTask(w http.ResponseWriter, r *http.Request)
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) RunTask ¶
func (h *TaskHandler) RunTask(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.