Documentation
¶
Index ¶
- type CommonProbeProperties
- type Comparator
- type ExecutionHistory
- type GET
- type K8SProbe
- type KubernetesCMDProbe
- type KubernetesHTTPProbe
- type Method
- type Operator
- func (p *Operator) CreateProbe(ctx context.Context, probe Probe) error
- func (p *Operator) GetAggregateProbes(ctx context.Context, pipeline mongo.Pipeline) (*mongo.Cursor, error)
- func (p *Operator) GetProbeByName(ctx context.Context, probeName string, projectID string) (Probe, error)
- func (p *Operator) IsProbeUnique(ctx context.Context, query bson.D) (bool, error)
- func (p *Operator) UpdateProbe(ctx context.Context, query bson.D, updateQuery bson.D) (*mongo.UpdateResult, error)
- func (p *Operator) UpdateProbes(ctx context.Context, query bson.D, updateQuery bson.D) (*mongo.UpdateResult, error)
- type POST
- type PROMProbe
- type Probe
- type ProbeResponseDetails
- type ProbeType
- type ProbeWithExecutionHistory
- type Probes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonProbeProperties ¶
type CommonProbeProperties struct { ProbeTimeout string `bson:"probe_timeout"` Interval string `bson:"interval"` PollingInterval *string `bson:"polling_interval,omitempty"` InitialDelay *string `bson:"initial_delay,omitempty"` EvaluationTimeout *string `bson:"evaluation_timeout,omitempty"` Retry *int `bson:"retry,omitempty"` Attempt *int `bson:"attempt,omitempty"` StopOnFailure *bool `bson:"stop_on_failure,omitempty"` }
type Comparator ¶
type ExecutionHistory ¶
type ExecutionHistory struct { ExperimentID string `bson:"experiment_id"` ExperimentName string `bson:"experiment_name"` UpdatedBy mongodb.UserDetailResponse `bson:"updated_by"` ExecutionData string `bson:"execution_data"` UpdatedAt int `bson:"updated_at"` Probes []Probes `bson:"probes"` Phase model.ExperimentRunStatus `bson:"phase"` }
type K8SProbe ¶
type K8SProbe struct { Group *string `bson:"group,omitempty"` Version string `bson:"version"` Resource string `bson:"resource"` ResourceNames *string `bson:"resourceNames,omitempty"` Namespace *string `bson:"namespace,omitempty"` FieldSelector *string `bson:"field_selector,omitempty"` LabelSelector *string `bson:"label_selector,omitempty"` Operation string `bson:"operation"` ProbeTimeout string `bson:"probe_timeout"` Interval string `bson:"interval"` InitialDelay *string `bson:"initial_delay,omitempty"` PollingInterval *string `bson:"polling_interval,omitempty"` EvaluationTimeout *string `bson:"evaluation_timeout,omitempty"` Retry *int `bson:"retry,omitempty"` Attempt *int `bson:"attempt,omitempty"` StopOnFailure *bool `bson:"stop_on_failure,omitempty"` }
type KubernetesCMDProbe ¶
type KubernetesCMDProbe struct { Command string `bson:"command"` ProbeTimeout string `bson:"probe_timeout"` Interval string `bson:"interval"` EvaluationTimeout *string `bson:"evaluation_timeout,omitempty"` PollingInterval *string `bson:"polling_interval,omitempty"` InitialDelay *string `bson:"initial_delay,omitempty"` Retry *int `bson:"retry,omitempty"` Attempt *int `bson:"attempt,omitempty"` Comparator Comparator `bson:"comparator"` Source *v1alpha1.SourceDetails `bson:"source,omitempty"` StopOnFailure *bool `bson:"stop_on_failure,omitempty"` }
type KubernetesHTTPProbe ¶
type KubernetesHTTPProbe struct { URL string `bson:"url"` ProbeTimeout string `bson:"probe_timeout"` Interval string `bson:"interval"` EvaluationTimeout *string `bson:"evaluation_timeout,omitempty"` PollingInterval *string `bson:"polling_interval,omitempty"` InitialDelay *string `bson:"initial_delay,omitempty"` Retry *int `bson:"retry,omitempty"` Attempt *int `bson:"attempt,omitempty"` Method Method `bson:"method"` StopOnFailure *bool `bson:"stop_on_failure,omitempty"` InsecureSkipVerify *bool `bson:"insecure_skip_verify,omitempty"` }
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator is the model for probe collection
func NewChaosProbeOperator ¶
func NewChaosProbeOperator(mongodbOperator mongodb.MongoOperator) *Operator
NewChaosProbeOperator returns a new instance of Operator
func (*Operator) CreateProbe ¶
CreateProbe creates a probe of a specific type (HTTP, PROM, K8s or CMD) as a shared entity in the database
func (*Operator) GetAggregateProbes ¶
func (p *Operator) GetAggregateProbes(ctx context.Context, pipeline mongo.Pipeline) (*mongo.Cursor, error)
GetAggregateProbes takes a mongo pipeline to retrieve the project details from the database
func (*Operator) GetProbeByName ¶
func (p *Operator) GetProbeByName(ctx context.Context, probeName string, projectID string) (Probe, error)
GetProbeByName fetches the details of a single Probe with its Probe Name
func (*Operator) IsProbeUnique ¶
IsProbeUnique returns true if probe is unique
type PROMProbe ¶
type PROMProbe struct { Endpoint string `bson:"endpoint"` Query *string `bson:"query"` EvaluationTimeout *string `bson:"evaluation_timeout,omitempty"` PollingInterval *string `bson:"polling_interval"` InitialDelay *string `bson:"initial_delay,omitempty"` QueryPath *string `bson:"query_path,omitempty"` ProbeTimeout string `bson:"probe_timeout"` Interval string `bson:"interval"` Retry *int `bson:"retry,omitempty"` Attempt *int `bson:"attempt,omitempty"` Comparator Comparator `bson:"comparator"` StopOnFailure *bool `bson:"stop_on_failure,omitempty"` }
type Probe ¶
type Probe struct { ProjectID string `bson:"project_id"` mongodb.ResourceDetails `bson:",inline"` mongodb.Audit `bson:",inline"` Type ProbeType `bson:"type"` InfrastructureType model.InfrastructureType `bson:"infrastructure_type"` KubernetesHTTPProperties *KubernetesHTTPProbe `bson:"kubernetes_http_properties,omitempty"` KubernetesCMDProperties *KubernetesCMDProbe `bson:"kubernetes_cmd_properties,omitempty"` PROMProperties *PROMProbe `bson:"prom_properties,omitempty"` K8SProperties *K8SProbe `bson:"k8s_properties,omitempty"` RecentExecutions []*model.ProbeRecentExecutions `bson:"recent_executions"` AverageSuccessPercentage float64 `bson:"average_success_percentage"` }
type ProbeResponseDetails ¶
type ProbeResponseDetails struct {
FaultName string `bson:"fault_name"`
}
type ProbeWithExecutionHistory ¶
type ProbeWithExecutionHistory struct { Probe `bson:",inline"` ExecutionHistory []ExecutionHistory `bson:"execution_history"` }
Click to show internal directories.
Click to hide internal directories.