Documentation ¶
Index ¶
- type ChaosWorkflowHandler
- func (c *ChaosWorkflowHandler) ChaosWorkflowRun(request model.WorkflowRunRequest, r store.StateData) (string, error)
- func (c *ChaosWorkflowHandler) CreateChaosWorkflow(ctx context.Context, request *model.ChaosWorkFlowRequest, r *store.StateData) (*model.ChaosWorkFlowResponse, error)
- func (c *ChaosWorkflowHandler) CreateWorkflowTemplate(ctx context.Context, request *model.TemplateInput) (*model.WorkflowTemplate, error)
- func (c *ChaosWorkflowHandler) DeleteChaosWorkflow(ctx context.Context, projectID string, workflowID *string, ...) (bool, error)
- func (c *ChaosWorkflowHandler) DeleteWorkflowTemplate(ctx context.Context, projectID string, templateID string) (bool, error)
- func (c *ChaosWorkflowHandler) GetKubeObjData(reqID string, kubeObject model.KubeObjectRequest, r store.StateData)
- func (c *ChaosWorkflowHandler) GetLogs(reqID string, pod model.PodLogRequest, r store.StateData)
- func (c *ChaosWorkflowHandler) GetWorkflowManifestByID(ctx context.Context, templateID string) (*model.WorkflowTemplate, error)
- func (c *ChaosWorkflowHandler) KubeObj(request model.KubeObjectData, r store.StateData) (string, error)
- func (c *ChaosWorkflowHandler) ListWorkflowManifests(ctx context.Context, projectID string) ([]*model.WorkflowTemplate, error)
- func (c *ChaosWorkflowHandler) ListWorkflowRuns(request model.ListWorkflowRunsRequest) (*model.ListWorkflowRunsResponse, error)
- func (c *ChaosWorkflowHandler) ListWorkflows(request model.ListWorkflowsRequest) (*model.ListWorkflowsResponse, error)
- func (c *ChaosWorkflowHandler) PodLog(request model.PodLog, r store.StateData) (string, error)
- func (c *ChaosWorkflowHandler) QueryServerVersion(ctx context.Context) (*model.ServerVersionResponse, error)
- func (c *ChaosWorkflowHandler) ReRunChaosWorkFlow(projectID string, workflowID string, username string) (string, error)
- func (c *ChaosWorkflowHandler) SyncWorkflowRun(ctx context.Context, projectID string, workflowID string, workflowRunID string, ...) (bool, error)
- func (c *ChaosWorkflowHandler) TerminateChaosWorkflow(ctx context.Context, projectID string, workflowID *string, ...) (bool, error)
- func (c *ChaosWorkflowHandler) UpdateChaosWorkflow(ctx context.Context, request *model.ChaosWorkFlowRequest, r *store.StateData) (*model.ChaosWorkFlowResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChaosWorkflowHandler ¶
type ChaosWorkflowHandler struct {
// contains filtered or unexported fields
}
ChaosWorkflowHandler is the handler for chaos workflow
func NewChaosWorkflowHandler ¶
func NewChaosWorkflowHandler( chaosWorkflowService chaosWorkflow.Service, clusterService cluster.Service, gitOpsService gitops.Service, chaosWorkflowOperator *dbOperationsWorkflow.Operator, chaosWorkflowTemplateOperator *dbOperationsWorkflowTemplate.Operator, mongodbOperator mongodb.MongoOperator, ) *ChaosWorkflowHandler
NewChaosWorkflowHandler returns a new instance of ChaosWorkflowHandler
func (*ChaosWorkflowHandler) ChaosWorkflowRun ¶
func (c *ChaosWorkflowHandler) ChaosWorkflowRun(request model.WorkflowRunRequest, r store.StateData) (string, error)
ChaosWorkflowRun Updates or Inserts a new Workflow Run into the DB
func (*ChaosWorkflowHandler) CreateChaosWorkflow ¶
func (c *ChaosWorkflowHandler) CreateChaosWorkflow(ctx context.Context, request *model.ChaosWorkFlowRequest, r *store.StateData) (*model.ChaosWorkFlowResponse, error)
CreateChaosWorkflow creates a new chaos workflow
func (*ChaosWorkflowHandler) CreateWorkflowTemplate ¶
func (c *ChaosWorkflowHandler) CreateWorkflowTemplate(ctx context.Context, request *model.TemplateInput) (*model.WorkflowTemplate, error)
CreateWorkflowTemplate is used to save the workflow manifest as a template
func (*ChaosWorkflowHandler) DeleteChaosWorkflow ¶
func (c *ChaosWorkflowHandler) DeleteChaosWorkflow(ctx context.Context, projectID string, workflowID *string, workflowRunID *string, r *store.StateData) (bool, error)
DeleteChaosWorkflow deletes the chaos workflow
func (*ChaosWorkflowHandler) DeleteWorkflowTemplate ¶
func (c *ChaosWorkflowHandler) DeleteWorkflowTemplate(ctx context.Context, projectID string, templateID string) (bool, error)
DeleteWorkflowTemplate is used to delete the workflow template (update the is_removed field as true)
func (*ChaosWorkflowHandler) GetKubeObjData ¶
func (c *ChaosWorkflowHandler) GetKubeObjData(reqID string, kubeObject model.KubeObjectRequest, r store.StateData)
func (*ChaosWorkflowHandler) GetLogs ¶
func (c *ChaosWorkflowHandler) GetLogs(reqID string, pod model.PodLogRequest, r store.StateData)
GetLogs query is used to fetch the logs from the cluster
func (*ChaosWorkflowHandler) GetWorkflowManifestByID ¶
func (c *ChaosWorkflowHandler) GetWorkflowManifestByID(ctx context.Context, templateID string) (*model.WorkflowTemplate, error)
GetWorkflowManifestByID is used to fetch the workflow template with template id
func (*ChaosWorkflowHandler) KubeObj ¶
func (c *ChaosWorkflowHandler) KubeObj(request model.KubeObjectData, r store.StateData) (string, error)
KubeObj receives Kubernetes Object data from subscriber
func (*ChaosWorkflowHandler) ListWorkflowManifests ¶
func (c *ChaosWorkflowHandler) ListWorkflowManifests(ctx context.Context, projectID string) ([]*model.WorkflowTemplate, error)
ListWorkflowManifests is used to list all the workflow templates available in the project
func (*ChaosWorkflowHandler) ListWorkflowRuns ¶
func (c *ChaosWorkflowHandler) ListWorkflowRuns(request model.ListWorkflowRunsRequest) (*model.ListWorkflowRunsResponse, error)
ListWorkflowRuns sends all the workflow runs for a project from the DB
func (*ChaosWorkflowHandler) ListWorkflows ¶
func (c *ChaosWorkflowHandler) ListWorkflows(request model.ListWorkflowsRequest) (*model.ListWorkflowsResponse, error)
ListWorkflows returns all the workflows present in the given project
func (*ChaosWorkflowHandler) PodLog ¶
PodLog receives logs from the workflow-agent and publishes to frontend clients
func (*ChaosWorkflowHandler) QueryServerVersion ¶
func (c *ChaosWorkflowHandler) QueryServerVersion(ctx context.Context) (*model.ServerVersionResponse, error)
QueryServerVersion is used to fetch the version of the server
func (*ChaosWorkflowHandler) ReRunChaosWorkFlow ¶
func (c *ChaosWorkflowHandler) ReRunChaosWorkFlow(projectID string, workflowID string, username string) (string, error)
ReRunChaosWorkFlow sends workflow run request(single run workflow only) to agent on workflow re-run request
func (*ChaosWorkflowHandler) SyncWorkflowRun ¶
func (*ChaosWorkflowHandler) TerminateChaosWorkflow ¶
func (*ChaosWorkflowHandler) UpdateChaosWorkflow ¶
func (c *ChaosWorkflowHandler) UpdateChaosWorkflow(ctx context.Context, request *model.ChaosWorkFlowRequest, r *store.StateData) (*model.ChaosWorkFlowResponse, error)