Documentation ¶
Index ¶
- Constants
- Variables
- func CleanScenario(t testing.TB, e *e2e.DockerEnvironment) func()
- func DefaultAlertmanagerImage() string
- func DefaultImage() string
- func DefaultPromConfig(name string, replica int, remoteWriteEndpoint, ruleFile string, ...) string
- func DefaultPrometheusImage() string
- func NewMemcached(e e2e.Environment, name string) *e2emon.InstrumentedRunnable
- func NewMinio(e e2e.Environment, name, bktName string) *e2emon.InstrumentedRunnable
- func NewPrometheus(e e2e.Environment, name, promConfig, webConfig, promImage string, ...) *e2emon.InstrumentedRunnable
- func NewPrometheusWithSidecar(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, ...) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)
- func NewPrometheusWithSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, ...) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)
- func NewReverseProxy(e e2e.Environment, name, tenantID, target string) *e2emon.InstrumentedRunnable
- func NewS3Config(bucket, endpoint, basePath string) s3.Config
- func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil.ReverseProxy
- func NewToolsBucketWeb(e e2e.Environment, name string, bucketConfig client.BucketConfig, ...) *e2emon.InstrumentedRunnable
- type QuerierBuilder
- func (q *QuerierBuilder) Init() *e2emon.InstrumentedRunnable
- func (q *QuerierBuilder) WithEnabledFeatures(enableFeatures []string) *QuerierBuilder
- func (q *QuerierBuilder) WithEndpoints(endpoints ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithExemplarAddresses(exemplarAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithExternalPrefix(externalPrefix string) *QuerierBuilder
- func (q *QuerierBuilder) WithFileSDStoreAddresses(fileSDStoreAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithImage(image string) *QuerierBuilder
- func (q *QuerierBuilder) WithMetadataAddresses(metadataAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithReplicaLabels(labels ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithRoutePrefix(routePrefix string) *QuerierBuilder
- func (q *QuerierBuilder) WithRuleAddresses(ruleAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithStoreAddresses(storeAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithTargetAddresses(targetAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithTracingConfig(tracingConfig string) *QuerierBuilder
Constants ¶
const (
// FeatureExemplarStorage is a feature flag that enables exemplar storage on Prometheus.
FeatureExemplarStorage = "exemplar-storage"
)
const LocalPrometheusTarget = "localhost:9090"
LocalPrometheusTarget is a constant to be used in the Prometheus config if you wish to enable Prometheus to scrape itself in a test.
Variables ¶
var QueryUpWithoutInstance = func() string { return "sum(up) without (instance)" }
NOTE: by using aggregation all results are now unsorted.
Functions ¶
func CleanScenario ¶
func CleanScenario(t testing.TB, e *e2e.DockerEnvironment) func()
func DefaultAlertmanagerImage ¶
func DefaultAlertmanagerImage() string
DefaultAlertmanagerImage sets default Alertmanager image used in e2e service.
func DefaultImage ¶
func DefaultImage() string
DefaultImage returns the local docker image to use to run Thanos.
func DefaultPromConfig ¶
func DefaultPromConfig(name string, replica int, remoteWriteEndpoint, ruleFile string, scrapeTargets ...string) string
DefaultPromConfig returns Prometheus config that sets Prometheus to: * expose 2 external labels, source and replica. * optionallly scrape self. This will produce up == 0 metric which we can assert on. * optionally remote write endpoint to write into.
func DefaultPrometheusImage ¶
func DefaultPrometheusImage() string
DefaultPrometheusImage sets default Prometheus image used in e2e service.
func NewMemcached ¶
func NewMemcached(e e2e.Environment, name string) *e2emon.InstrumentedRunnable
func NewMinio ¶
func NewMinio(e e2e.Environment, name, bktName string) *e2emon.InstrumentedRunnable
NewMinio returns minio server, used as a local replacement for S3. TODO(@matej-g): This is a temporary workaround for https://github.com/efficientgo/e2e/issues/11; after this is addresses fixed all calls should be replaced with e2edb.NewMinio.
func NewPrometheus ¶
func NewPrometheus(e e2e.Environment, name, promConfig, webConfig, promImage string, enableFeatures ...string) *e2emon.InstrumentedRunnable
func NewPrometheusWithSidecar ¶
func NewPrometheusWithSidecar(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, enableFeatures ...string) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)
func NewPrometheusWithSidecarCustomImage ¶
func NewPrometheusWithSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, sidecarImage string, enableFeatures ...string) (*e2emon.InstrumentedRunnable, *e2emon.InstrumentedRunnable)
func NewReverseProxy ¶
func NewReverseProxy(e e2e.Environment, name, tenantID, target string) *e2emon.InstrumentedRunnable
func NewS3Config ¶
func NewSingleHostReverseProxy ¶
func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil.ReverseProxy
NewSingleHostReverseProxy is almost same as httputil.NewSingleHostReverseProxy but it performs a url path rewrite.
func NewToolsBucketWeb ¶
func NewToolsBucketWeb( e e2e.Environment, name string, bucketConfig client.BucketConfig, routePrefix, externalPrefix string, minTime string, maxTime string, relabelConfig string, ) *e2emon.InstrumentedRunnable
Types ¶
type QuerierBuilder ¶
func NewQuerierBuilder ¶
func NewQuerierBuilder(e e2e.Environment, name string, storeAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) Init ¶
func (q *QuerierBuilder) Init() *e2emon.InstrumentedRunnable
func (*QuerierBuilder) WithEnabledFeatures ¶
func (q *QuerierBuilder) WithEnabledFeatures(enableFeatures []string) *QuerierBuilder
func (*QuerierBuilder) WithEndpoints ¶
func (q *QuerierBuilder) WithEndpoints(endpoints ...string) *QuerierBuilder
func (*QuerierBuilder) WithExemplarAddresses ¶
func (q *QuerierBuilder) WithExemplarAddresses(exemplarAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithExternalPrefix ¶
func (q *QuerierBuilder) WithExternalPrefix(externalPrefix string) *QuerierBuilder
func (*QuerierBuilder) WithFileSDStoreAddresses ¶
func (q *QuerierBuilder) WithFileSDStoreAddresses(fileSDStoreAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithImage ¶
func (q *QuerierBuilder) WithImage(image string) *QuerierBuilder
func (*QuerierBuilder) WithMetadataAddresses ¶
func (q *QuerierBuilder) WithMetadataAddresses(metadataAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithReplicaLabels ¶
func (q *QuerierBuilder) WithReplicaLabels(labels ...string) *QuerierBuilder
WithReplicaLabels replaces default [replica] replica label configuration for the querier.
func (*QuerierBuilder) WithRoutePrefix ¶
func (q *QuerierBuilder) WithRoutePrefix(routePrefix string) *QuerierBuilder
func (*QuerierBuilder) WithRuleAddresses ¶
func (q *QuerierBuilder) WithRuleAddresses(ruleAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithStoreAddresses ¶
func (q *QuerierBuilder) WithStoreAddresses(storeAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithTargetAddresses ¶
func (q *QuerierBuilder) WithTargetAddresses(targetAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithTracingConfig ¶
func (q *QuerierBuilder) WithTracingConfig(tracingConfig string) *QuerierBuilder