Documentation
¶
Overview ¶
Package shared provides code shared between the e2e test suite the telemetry matcher used in the e2e tests.
Index ¶
Constants ¶
View Source
const ( QueryParamExpectationMode = "expectation-mode" QueryParamRuntime = "runtime" QueryParamRuntimeWorkloadName = "runtime-workload-name" QueryParamWorkloadType = "workload-type" QueryParamTimestampLowerBoundStr = "timestamp-lower-bound" QueryParamClusterName = "cluster" QueryParamNamespace = "namespace" QueryParamOperatorNamespace = "operator-namespace" QueryParamCheckResourceAttributes = "check-resource-attributes" QueryParamRoute = "route" QueryParamQuery = "query" QueryParamTarget = "target" QueryParamLogsResourceMatcherMode = "logs-resource-matcher" QueryParamServiceVersion = "service-version" QueryParamLogBodyEquals = "log-body-equals" QueryParamLogBodyContains = "log-body-contains" QueryParamEventReason = "event-reason" QueryParamEventNameContains = "event-name-contains" QueryParamMetricsMatchMode = "metrics-match-mode" QueryParamDeploymentName = "deployment-name" QueryParamExpectPodUid = "expect-pod-uid" QueryParamFailOnNamespaceOtherThan = "fail-on-namespace-other-than" QueryParamFailOnNamespaceScopedMetric = "fail-on-namespace-scoped-metric" QueryParamMetricNameList = "metric-name-list" )
Variables ¶
View Source
var ( AllExpectationModes = []string{ string(ExpectAtLeastOne), string(ExpectExactlyOne), string(ExpectNoMatches), } )
View Source
var ( AllLogResourceMatcherModes = []string{ string(LogResourceMatcherWorkload), string(LogResourceMatcherSelfMonitoringLogsOperatorManager), string(LogResourceMatcherSelfMonitoringLogsCollector), } )
View Source
var ( AllMetricNameLists = []string{ string(KubeletStatsReceiverMetricNameList), string(K8sClusterReceiverMetricNameList), string(PrometheusReceiverMetricNameList), } )
View Source
var ( AllMetricsMatchModes = []string{ string(MetricsMatchModeWorkload), string(MetricsMatchModeSelfMonitoringOperatorManager), string(MetricsMatchModeSelfMonitoringCollector), string(MetricsMatchModeMatchAll), } )
Functions ¶
This section is empty.
Types ¶
type ExpectationMode ¶
type ExpectationMode string
const ( ExpectAtLeastOne ExpectationMode = "at-least-one" ExpectExactlyOne ExpectationMode = "exactly-one" ExpectNoMatches ExpectationMode = "no-matches" )
type ExpectationResult ¶
type ExpectationResult struct {
Success bool `json:"success"`
Description string `json:"description,omitempty"`
}
func NewFailureWithDescription ¶
func NewFailureWithDescription(description string) ExpectationResult
func NewSuccess ¶
func NewSuccess() ExpectationResult
type LogResourceMatcherMode ¶
type LogResourceMatcherMode string
const ( LogResourceMatcherWorkload LogResourceMatcherMode = "workload" LogResourceMatcherSelfMonitoringLogsOperatorManager LogResourceMatcherMode = "self-monitoring-logs-operator-manager" LogResourceMatcherSelfMonitoringLogsCollector LogResourceMatcherMode = "self-monitoring-logs-collector" )
type MetricNameList ¶
type MetricNameList string
const ( KubeletStatsReceiverMetricNameList MetricNameList = "kubelet-stats-receiver" K8sClusterReceiverMetricNameList MetricNameList = "k8s-cluster-receiver" PrometheusReceiverMetricNameList MetricNameList = "prometheus-receiver" )
type MetricsMatchMode ¶
type MetricsMatchMode string
const ( MetricsMatchModeWorkload MetricsMatchMode = "metrics-match-mode-workload" MetricsMatchModeSelfMonitoringOperatorManager MetricsMatchMode = "metrics-match-mode-self-monitoring-operator-manager" MetricsMatchModeSelfMonitoringCollector MetricsMatchMode = "metrics-match-mode-self-monitoring-collector" MetricsMatchModeMatchAll MetricsMatchMode = "metrics-match-mode-match-all" )
Click to show internal directories.
Click to hide internal directories.