Documentation ¶
Index ¶
- type AggregatedGetInfras
- type AggregatedInfraStats
- type AggregatedInfras
- type ChaosInfra
- type ChaosInfraDetails
- type ExperimentRuns
- type Experiments
- type Operator
- func (c *Operator) GetAggregateInfras(pipeline mongo.Pipeline) (*mongo.Cursor, error)
- func (c *Operator) GetInfra(infraID string) (ChaosInfra, error)
- func (c *Operator) GetInfraDetails(ctx context.Context, infraID string, projectID string) (ChaosInfra, error)
- func (c *Operator) GetInfraWithProjectID(projectID string) ([]*ChaosInfra, error)
- func (c *Operator) GetInfras(ctx context.Context, query bson.D) ([]ChaosInfra, error)
- func (c *Operator) InsertInfra(ctx context.Context, infra ChaosInfra) error
- func (c *Operator) UpdateInfra(ctx context.Context, query bson.D, update bson.D) error
- type Toleration
- type TotalCount
- type TotalFilteredData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedGetInfras ¶
type AggregatedGetInfras struct { TotalFilteredInfras []TotalFilteredData `bson:"total_filtered_infras"` Infras []ChaosInfraDetails `bson:"infras"` }
type AggregatedInfraStats ¶
type AggregatedInfraStats struct { TotalActiveInfrastructure []TotalCount `bson:"total_active_infras"` TotalConfirmedInfrastructures []TotalCount `bson:"total_confirmed_infras"` }
type AggregatedInfras ¶
type AggregatedInfras struct { TotalFilteredInfras []TotalFilteredData `bson:"total_filtered_infras"` Infras []ChaosInfraDetails `bson:"infras"` }
type ChaosInfra ¶
type ChaosInfra struct { mongodb.ResourceDetails `bson:",inline"` mongodb.Audit `bson:",inline"` ProjectID string `bson:"project_id"` InfraID string `bson:"infra_id"` InfraNamespace *string `bson:"infra_namespace"` PlatformName string `bson:"platform_name"` ServiceAccount *string `bson:"service_account"` InfraScope string `bson:"infra_scope"` InfraNsExists *bool `bson:"infra_ns_exists"` EnvironmentID string `bson:"environment_id"` InfraSaExists *bool `bson:"infra_sa_exists"` AccessKey string `bson:"access_key"` InfraType string `bson:"infra_type"` IsRegistered bool `bson:"is_registered"` IsInfraConfirmed bool `bson:"is_infra_confirmed"` IsActive bool `bson:"is_active"` Token string `bson:"token"` SkipSSL *bool `bson:"skip_ssl"` NodeSelector *string `bson:"node_selector"` Tolerations []*Toleration `bson:"tolerations,omitempty"` StartTime string `bson:"start_time"` Version string `bson:"version"` }
ChaosInfra contains the required fields to be stored in the database for an chaos_infra
type ChaosInfraDetails ¶
type ChaosInfraDetails struct { InfraID string `bson:"infra_id"` mongodb.ResourceDetails `bson:",inline"` mongodb.Audit `bson:",inline"` ProjectID string `bson:"project_id"` EnvironmentID string `bson:"environment_id"` PlatformName string `bson:"platform_name"` Token string `bson:"token"` InfraScope string `bson:"infra_scope"` AccessKey string `bson:"access_key"` StartTime string `bson:"start_time"` Version string `bson:"version"` NodeSelector *string `bson:"node_selector"` InfraNamespace *string `bson:"infra_namespace"` ServiceAccount *string `bson:"service_account"` Tolerations []*Toleration `bson:"tolerations,omitempty"` ExperimentRunDetails []ExperimentRuns `bson:"expRunDetails"` ExperimentDetails []Experiments `bson:"experimentDetails"` IsRegistered bool `bson:"is_registered"` IsInfraConfirmed bool `bson:"is_infra_confirmed"` IsActive bool `bson:"is_active"` SkipSSL *bool `bson:"skip_ssl"` InfraNsExists *bool `bson:"infra_ns_exists"` InfraSaExists *bool `bson:"infra_sa_exists"` }
ChaosInfraDetails contains the fields required for sending infra details as response
type ExperimentRuns ¶
type ExperimentRuns struct { LastRunTimestamp int64 `bson:"last_run_timestamp"` TotalRuns int `bson:"exp_run_count"` }
ExperimentRuns returns corresponding experiment run details
type Experiments ¶
type Experiments struct { TotalSchedules int `bson:"experiments_count"` LastRunTimestamp int64 `bson:"last_run_timestamp"` TotalRuns int `bson:"exp_run_count"` }
Experiments returns corresponding experiment run details
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator is the model for cluster collection
func NewInfrastructureOperator ¶
func NewInfrastructureOperator(mongodbOperator mongodb.MongoOperator) *Operator
NewInfrastructureOperator returns a new instance of Operator
func (*Operator) GetAggregateInfras ¶
GetAggregateInfras takes a mongo pipeline to retrieve the details from the database
func (*Operator) GetInfra ¶
func (c *Operator) GetInfra(infraID string) (ChaosInfra, error)
GetInfra takes a infraID to retrieve the chaos_infra details from the database
func (*Operator) GetInfraDetails ¶
func (c *Operator) GetInfraDetails(ctx context.Context, infraID string, projectID string) (ChaosInfra, error)
GetInfraDetails takes a infraName and projectID to retrieve the chaos_infra details from the database
func (*Operator) GetInfraWithProjectID ¶
func (c *Operator) GetInfraWithProjectID(projectID string) ([]*ChaosInfra, error)
GetInfraWithProjectID takes projectID parameters to retrieve the chaos_infra details
func (*Operator) InsertInfra ¶
func (c *Operator) InsertInfra(ctx context.Context, infra ChaosInfra) error
InsertInfra takes details of a chaos_infra and inserts into the database collection
type Toleration ¶
type Toleration struct { Key *string `bson:"key,omitempty" yaml:"key,omitempty" json:"key,omitempty"` Operator *string `bson:"operator,omitempty" yaml:"operator,omitempty" json:"operator,omitempty"` Effect *string `bson:"effect,omitempty" yaml:"effect,omitempty" json:"effect,omitempty"` Value *string `bson:"value,omitempty" yaml:"value,omitempty" json:"value,omitempty"` TolerationSeconds *int `bson:"toleration_seconds,omitempty" yaml:"tolerationSeconds,omitempty" json:"tolerationSeconds,omitempty"` }
type TotalCount ¶
type TotalFilteredData ¶
type TotalFilteredData struct {
Count int `bson:"count"`
}