Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendWorkflowToSubscriber ¶
func SendWorkflowToSubscriber(workflow *model.ChaosWorkFlowRequest, username *string, externalData *string, reqType string, r *store.StateData)
SendWorkflowToSubscriber sends the workflow to the subscriber to be handled
Types ¶
type ChaosData ¶
type ChaosData struct { EngineUID string `json:"engineUID"` EngineContext string `json:"engine_context"` EngineName string `json:"engineName"` Namespace string `json:"namespace"` ExperimentName string `json:"experimentName"` ExperimentStatus string `json:"experimentStatus"` LastUpdatedAt string `json:"lastUpdatedAt"` ExperimentVerdict string `json:"experimentVerdict"` ExperimentPod string `json:"experimentPod"` RunnerPod string `json:"runnerPod"` ProbeSuccessPercentage string `json:"probeSuccessPercentage"` FailStep string `json:"failStep"` ChaosResult *chaosTypes.ChaosResult `json:"chaosResult"` }
ChaosData is the data we get from chaos exporter
type ExecutionData ¶
type ExecutionData struct { WorkflowType string `json:"workflow_type"` WorkflowID string `json:"-"` EventType string `json:"event_type"` UID string `json:"-"` Namespace string `json:"namespace"` Name string `json:"name"` CreationTimestamp string `json:"creationTimestamp"` Phase string `json:"phase"` Message string `json:"message"` StartedAt string `json:"startedAt"` FinishedAt string `json:"finishedAt"` Nodes map[string]Node `json:"nodes"` }
type Node ¶
type Node struct { Name string `json:"name"` Phase string `json:"phase"` Message string `json:"message"` StartedAt string `json:"startedAt"` FinishedAt string `json:"finishedAt"` Children []string `json:"children"` Type string `json:"type"` ChaosExp *ChaosData `json:"chaosData,omitempty"` }
Node represents each node/step data
type Service ¶
type Service interface { ProcessWorkflow(workflow *model.ChaosWorkFlowRequest) (*model.ChaosWorkFlowRequest, *dbSchemaWorkflow.ChaosWorkflowType, error) ProcessWorkflowCreation(input *model.ChaosWorkFlowRequest, username string, wfType *dbSchemaWorkflow.ChaosWorkflowType, r *store.StateData) error ProcessWorkflowUpdate(workflow *model.ChaosWorkFlowRequest, username string, wfType *dbSchemaWorkflow.ChaosWorkflowType, r *store.StateData) error ProcessWorkflowRunDelete(query bson.D, workflowRunID *string, workflow workflowDBOps.ChaosWorkFlowRequest, username string, r *store.StateData) error ProcessWorkflowDelete(query bson.D, workflow workflowDBOps.ChaosWorkFlowRequest, username string, r *store.StateData) error ProcessCompletedWorkflowRun(execData ExecutionData, wfID string) (WorkflowRunMetrics, error) SendWorkflowEvent(wfRun model.WorkflowRun, r *store.StateData) ProcessWorkflowRunSync(workflowID string, workflowRunID *string, workflow workflowDBOps.ChaosWorkFlowRequest, r *store.StateData) error GetWorkflow(query bson.D) (dbOperationsWorkflow.ChaosWorkFlowRequest, error) GetWorkflows(query bson.D) ([]dbOperationsWorkflow.ChaosWorkFlowRequest, error) }
func NewService ¶
func NewService(chaosWorkflowOperator *dbOperationsWorkflow.Operator, clusterOperator *dbOperationsCluster.Operator) Service
NewService returns a new instance of the chaos workflow service
type WorkflowRunMetrics ¶
type WorkflowRunMetrics struct { ResiliencyScore float64 `json:"resiliency_score"` ExperimentsPassed int `json:"experiments_passed"` ExperimentsFailed int `json:"experiments_failed"` ExperimentsAwaited int `json:"experiments_awaited"` ExperimentsStopped int `json:"experiments_stopped"` ExperimentsNA int `json:"experiments_na"` TotalExperiments int `json:"total_experiments"` }
Click to show internal directories.
Click to hide internal directories.