Documentation ¶
Index ¶
- type ChaosExperimentRun
- type FlattenedExperimentRun
- type Operator
- func (c *Operator) CountExperimentRuns(ctx context.Context, query bson.D) (int64, error)
- func (c *Operator) CreateExperimentRun(ctx context.Context, wfRun ChaosExperimentRun) error
- func (c *Operator) GetAggregateExperimentRuns(pipeline mongo.Pipeline) (*mongo.Cursor, error)
- func (c *Operator) GetExperimentRun(query bson.D) (ChaosExperimentRun, error)
- func (c *Operator) GetExperimentRuns(query bson.D) ([]ChaosExperimentRun, error)
- func (c *Operator) GetExperimentRunsByInfraID(infraID string) ([]ChaosExperimentRun, error)
- func (c *Operator) UpdateExperimentRun(ctx context.Context, wfRun ChaosExperimentRun) (int, error)
- func (c *Operator) UpdateExperimentRunWithQuery(ctx context.Context, query bson.D, update bson.D) error
- func (c *Operator) UpdateExperimentRunsWithQuery(ctx context.Context, query bson.D, update bson.D) error
- type Probes
- type TotalFilteredData
- type WeightagesInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChaosExperimentRun ¶
type ChaosExperimentRun struct { ProjectID string `bson:"project_id"` mongodb.Audit `bson:",inline"` InfraID string `bson:"infra_id"` ExperimentRunID string `bson:"experiment_run_id"` ExperimentID string `bson:"experiment_id"` ExperimentName string `bson:"experiment_name"` Phase string `bson:"phase"` Probes []Probes `bson:"probes"` ExecutionData string `bson:"execution_data"` RevisionID string `bson:"revision_id"` NotifyID *string `bson:"notify_id"` ResiliencyScore *float64 `bson:"resiliency_score,omitempty"` FaultsPassed *int `bson:"faults_passed,omitempty"` FaultsFailed *int `bson:"faults_failed,omitempty"` FaultsAwaited *int `bson:"faults_awaited,omitempty"` FaultsStopped *int `bson:"faults_stopped,omitempty"` FaultsNA *int `bson:"faults_na,omitempty"` TotalFaults *int `bson:"total_faults,omitempty"` RunSequence int `bson:"run_sequence"` Completed bool `bson:"completed"` }
ChaosExperimentRun contains the required fields to be stored in the database for an experiment run
type FlattenedExperimentRun ¶
type FlattenedExperimentRun struct { ProjectID string `bson:"project_id"` InfraID string `bson:"infra_id"` ExperimentRunID string `bson:"experiment_run_id"` ExperimentID string `bson:"experiment_id"` ExperimentName string `bson:"experiment_name"` CronSyntax string `bson:"cronSyntax"` Weightages []*WeightagesInput `bson:"weightages"` IsCustomWorkflow bool `bson:"isCustomWorkflow"` UpdatedAt string `bson:"updated_at"` CreatedAt string `bson:"created_at"` ExperimentRuns ChaosExperimentRun `bson:"experiment_runs"` IsRemoved bool `bson:"isRemoved"` }
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
func NewChaosExperimentRunOperator ¶
func NewChaosExperimentRunOperator(mongodbOperator mongodb.MongoOperator) *Operator
func (*Operator) CountExperimentRuns ¶
func (*Operator) CreateExperimentRun ¶
func (c *Operator) CreateExperimentRun(ctx context.Context, wfRun ChaosExperimentRun) error
func (*Operator) GetAggregateExperimentRuns ¶
GetAggregateExperimentRuns takes a mongo pipeline to retrieve the experiment details from the database
func (*Operator) GetExperimentRun ¶
func (c *Operator) GetExperimentRun(query bson.D) (ChaosExperimentRun, error)
func (*Operator) GetExperimentRuns ¶
func (c *Operator) GetExperimentRuns(query bson.D) ([]ChaosExperimentRun, error)
func (*Operator) GetExperimentRunsByInfraID ¶
func (c *Operator) GetExperimentRunsByInfraID(infraID string) ([]ChaosExperimentRun, error)
GetExperimentRunsByInfraID takes a infraID parameter to retrieve the experiment details from the database
func (*Operator) UpdateExperimentRun ¶
UpdateExperimentRun takes experimentID and wfRun parameters to update the experiment run details in the database
func (*Operator) UpdateExperimentRunWithQuery ¶
type TotalFilteredData ¶
type TotalFilteredData struct {
Count int `bson:"count"`
}
type WeightagesInput ¶
Click to show internal directories.
Click to hide internal directories.