Documentation ¶
Index ¶
- type AverageResScore
- type ChaosData
- type ExecutionData
- type ExperimentDetails
- type ExperimentRunMetrics
- type ExperimentSyncExternalData
- type FaultDetailsForAnalytics
- type InfraDetails
- type LastRunDetails
- type LatestExperimentRun
- type Node
- type ProbeDetailsForAnalytics
- type Service
- type StopExperimentInputs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AverageResScore ¶
type AverageResScore struct { ID string `bson:"_id"` Avg float64 `bson:"avg_resiliency_score"` TotalExperimentRuns int `bson:"total_experiment_runs"` }
AverageResScore represents the avg_resiliency_score and total_experiment_runs of a experiment
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 { ExperimentType string `json:"experimentType"` ExperimentID string `json:"experimentID"` EventType string `json:"eventType"` RevisionID string `json:"revisionID"` UID string `json:"uid"` 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 ExperimentDetails ¶
type ExperimentDetails struct { ID string `bson:"_id"` AverageResScore []AverageResScore `bson:"avg_resiliency_score"` PercentageChange float64 `bson:"percentage_change"` LatestExperimentRun []experimentRunDetails `bson:"latest_experiment_run"` }
ExperimentDetails is used to decode mongo cursor consisting of experiment details
type ExperimentRunMetrics ¶
type ExperimentRunMetrics 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"` }
type FaultDetailsForAnalytics ¶
type FaultDetailsForAnalytics struct { FaultName string `json:"fault_name"` TotalProbes int `json:"total_probes"` Probes []ProbeDetailsForAnalytics `json:"probes"` }
type InfraDetails ¶
type LastRunDetails ¶
type LastRunDetails struct { ID string `bson:"_id"` AvgResScore float64 `bson:"avg_resiliency_score"` PercentageChange float64 `bson:"percentage_change"` LatestExperimentRun LatestExperimentRun `bson:"latest_experiment_run"` }
LastRunDetails represents the details of latest experiment run. avg_resiliency_score and percentage_change in resiliency_score of a experiment
type LatestExperimentRun ¶
type LatestExperimentRun struct { ExperimentRunID string `bson:"experiment_run_id"` // Resiliency score of the experiment ResiliencyScore *float64 `bson:"resiliency_score"` // Timestamp at which experiment run was last updated LastUpdated string `bson:"updated_at"` // Phase of the experiment run Phase string `bson:"phase"` }
LatestExperimentRun represents the details of the latest experiment run
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 { ProcessExperimentRunDelete(ctx context.Context, query bson.D, workflowRunID *string, experimentRun dbChaosExperimentRun.ChaosExperimentRun, workflow dbChaosExperiment.ChaosExperimentRequest, username string, r *store.StateData) error ProcessCompletedExperimentRun(execData ExecutionData, wfID string, runID string) (ExperimentRunMetrics, error) ProcessExperimentRunStop(ctx context.Context, query bson.D, experimentRunID *string, experiment dbChaosExperiment.ChaosExperimentRequest, username string, projectID string, r *store.StateData) error }
func NewChaosExperimentRunService ¶
func NewChaosExperimentRunService(chaosWorkflowOperator *dbChaosExperiment.Operator, clusterOperator *dbChaosInfra.Operator, chaosExperimentRunOperator *dbChaosExperimentRun.Operator) Service
NewChaosExperimentRunService returns a new instance of the chaos workflow run service
type StopExperimentInputs ¶
Click to show internal directories.
Click to hide internal directories.