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 NewAlertmanager(e e2e.Environment, name string) (e2e.InstrumentedRunnable, error)
- func NewCompactor(e e2e.Environment, name string, bucketConfig client.BucketConfig, ...) (e2e.InstrumentedRunnable, error)
- func NewIngestingReceiver(e e2e.Environment, name string) (e2e.InstrumentedRunnable, error)
- func NewMemcached(e e2e.Environment, name string) e2e.InstrumentedRunnable
- func NewMinio(env e2e.Environment, name, bktName string) (e2e.InstrumentedRunnable, error)
- func NewPrometheus(e e2e.Environment, name, promConfig, webConfig, promImage string, ...) (e2e.InstrumentedRunnable, string, error)
- func NewPrometheusWithSidecar(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, ...) (e2e.InstrumentedRunnable, e2e.InstrumentedRunnable, error)
- func NewPrometheusWithSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, ...) (e2e.InstrumentedRunnable, e2e.InstrumentedRunnable, error)
- func NewQueryFrontend(e e2e.Environment, name, downstreamURL string, ...) (e2e.InstrumentedRunnable, error)
- func NewReverseProxy(e e2e.Environment, name, tenantID, target string) (e2e.InstrumentedRunnable, error)
- func NewRoutingAndIngestingReceiverFromService(service e2e.InstrumentedRunnableBuilder, sharedDir string, ...) (e2e.InstrumentedRunnable, error)
- func NewRoutingAndIngestingReceiverWithConfigWatcher(service e2e.InstrumentedRunnableBuilder, sharedDir string, ...) (e2e.InstrumentedRunnable, error)
- func NewRoutingReceiver(e e2e.Environment, name string, replicationFactor int, ...) (e2e.InstrumentedRunnable, error)
- func NewS3Config(bucket, endpoint, basePath string) s3.Config
- func NewService(e e2e.Environment, name string, image string, command e2e.Command, ...) e2e.InstrumentedRunnable
- func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil.ReverseProxy
- func NewStatelessRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, ...) (e2e.InstrumentedRunnable, error)
- func NewStoreGW(e e2e.Environment, name string, bucketConfig client.BucketConfig, ...) (e2e.InstrumentedRunnable, error)
- func NewTSDBRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, ...) (e2e.InstrumentedRunnable, error)
- func NewToolsBucketWeb(e e2e.Environment, name string, bucketConfig client.BucketConfig, ...) (e2e.InstrumentedRunnable, error)
- func NewUninitiatedReceiver(e e2e.Environment, name string) e2e.InstrumentedRunnableBuilder
- func RemoteWriteEndpoint(addr string) string
- type Port
- type QuerierBuilder
- func (q *QuerierBuilder) Build() (e2e.InstrumentedRunnable, error)
- func (q *QuerierBuilder) BuildUninitiated() e2e.InstrumentedRunnableBuilder
- func (q *QuerierBuilder) Initiate(service e2e.InstrumentedRunnableBuilder, storeAddresses ...string) (e2e.InstrumentedRunnable, error)
- 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) WithRoutePrefix(routePrefix string) *QuerierBuilder
- func (q *QuerierBuilder) WithRuleAddresses(ruleAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithTargetAddresses(targetAddresses ...string) *QuerierBuilder
- func (q *QuerierBuilder) WithTracingConfig(tracingConfig string) *QuerierBuilder
Constants ¶
const (
)const (
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 ¶ added in v0.14.0
func CleanScenario(t testing.TB, e *e2e.DockerEnvironment) func()
func DefaultAlertmanagerImage ¶
func DefaultAlertmanagerImage() string
func DefaultImage ¶
func DefaultImage() string
DefaultImage returns the local docker image to use to run Thanos.
func DefaultPromConfig ¶ added in v0.26.0
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
TODO(bwplotka): Run against multiple?
func NewAlertmanager ¶
func NewAlertmanager(e e2e.Environment, name string) (e2e.InstrumentedRunnable, error)
func NewCompactor ¶
func NewCompactor(e e2e.Environment, name string, bucketConfig client.BucketConfig, relabelConfig []relabel.Config, extArgs ...string) (e2e.InstrumentedRunnable, error)
func NewIngestingReceiver ¶ added in v0.22.0
func NewIngestingReceiver(e e2e.Environment, name string) (e2e.InstrumentedRunnable, error)
NewIngestingReceiver creates a Thanos Receive instance that is only configured to ingest, not route to other receivers.
func NewMemcached ¶ added in v0.16.0
func NewMemcached(e e2e.Environment, name string) e2e.InstrumentedRunnable
func NewMinio ¶ added in v0.24.0
func NewMinio(env e2e.Environment, name, bktName string) (e2e.InstrumentedRunnable, error)
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) (e2e.InstrumentedRunnable, string, error)
func NewPrometheusWithSidecar ¶
func NewPrometheusWithSidecar(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, enableFeatures ...string) (e2e.InstrumentedRunnable, e2e.InstrumentedRunnable, error)
func NewPrometheusWithSidecarCustomImage ¶ added in v0.24.0
func NewPrometheusWithSidecarCustomImage(e e2e.Environment, name, promConfig, webConfig, promImage, minTime string, sidecarImage string, enableFeatures ...string) (e2e.InstrumentedRunnable, e2e.InstrumentedRunnable, error)
func NewQueryFrontend ¶ added in v0.15.0
func NewQueryFrontend(e e2e.Environment, name, downstreamURL string, cacheConfig queryfrontend.CacheProviderConfig) (e2e.InstrumentedRunnable, error)
func NewReverseProxy ¶ added in v0.24.0
func NewReverseProxy(e e2e.Environment, name, tenantID, target string) (e2e.InstrumentedRunnable, error)
func NewRoutingAndIngestingReceiverFromService ¶ added in v0.24.0
func NewRoutingAndIngestingReceiverFromService(service e2e.InstrumentedRunnableBuilder, sharedDir string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)
NewRoutingAndIngestingReceiverFromService creates a Thanos Receive instances from an unitiated service. It is configured both for ingesting samples and routing samples to other receivers.
func NewRoutingAndIngestingReceiverWithConfigWatcher ¶ added in v0.22.0
func NewRoutingAndIngestingReceiverWithConfigWatcher(service e2e.InstrumentedRunnableBuilder, sharedDir string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)
func NewRoutingReceiver ¶ added in v0.22.0
func NewRoutingReceiver(e e2e.Environment, name string, replicationFactor int, hashring ...receive.HashringConfig) (e2e.InstrumentedRunnable, error)
NewRoutingReceiver creates a Thanos Receive instance that is only configured to route to other receive instances. It has no local storage.
func NewS3Config ¶ added in v0.25.0
func NewService ¶
func NewService( e e2e.Environment, name string, image string, command e2e.Command, readiness *e2e.HTTPReadinessProbe, http, grpc int, otherPorts ...Port, ) e2e.InstrumentedRunnable
func NewSingleHostReverseProxy ¶ added in v0.15.0
func NewSingleHostReverseProxy(target *url.URL, externalPrefix string) *httputil.ReverseProxy
NewSingleHostReverseProxy is almost same as httputil.NewSingleHostReverseProxy but it performs a url path rewrite.
func NewStatelessRuler ¶ added in v0.24.0
func NewStatelessRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, queryCfg []httpconfig.Config, remoteWriteCfg []*config.RemoteWriteConfig) (e2e.InstrumentedRunnable, error)
func NewStoreGW ¶
func NewStoreGW(e e2e.Environment, name string, bucketConfig client.BucketConfig, cacheConfig string, extArgs []string, relabelConfig ...relabel.Config) (e2e.InstrumentedRunnable, error)
func NewTSDBRuler ¶ added in v0.24.0
func NewTSDBRuler(e e2e.Environment, name, ruleSubDir string, amCfg []alert.AlertmanagerConfig, queryCfg []httpconfig.Config) (e2e.InstrumentedRunnable, error)
func NewToolsBucketWeb ¶ added in v0.20.0
func NewToolsBucketWeb( e e2e.Environment, name string, bucketConfig client.BucketConfig, routePrefix, externalPrefix string, minTime string, maxTime string, relabelConfig string, ) (e2e.InstrumentedRunnable, error)
func NewUninitiatedReceiver ¶ added in v0.24.0
func NewUninitiatedReceiver(e e2e.Environment, name string) e2e.InstrumentedRunnableBuilder
NewUninitiatedReceiver returns a future receiver that can be initiated. It is useful for obtaining a receiver address for hashring before the receiver is started.
func RemoteWriteEndpoint ¶
Types ¶
type QuerierBuilder ¶ added in v0.22.0
type QuerierBuilder struct {
// contains filtered or unexported fields
}
func NewQuerierBuilder ¶ added in v0.22.0
func NewQuerierBuilder(e e2e.Environment, name string, storeAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) Build ¶ added in v0.22.0
func (q *QuerierBuilder) Build() (e2e.InstrumentedRunnable, error)
func (*QuerierBuilder) BuildUninitiated ¶ added in v0.24.0
func (q *QuerierBuilder) BuildUninitiated() e2e.InstrumentedRunnableBuilder
func (*QuerierBuilder) Initiate ¶ added in v0.24.0
func (q *QuerierBuilder) Initiate(service e2e.InstrumentedRunnableBuilder, storeAddresses ...string) (e2e.InstrumentedRunnable, error)
func (*QuerierBuilder) WithEnabledFeatures ¶ added in v0.24.0
func (q *QuerierBuilder) WithEnabledFeatures(enableFeatures []string) *QuerierBuilder
func (*QuerierBuilder) WithEndpoints ¶ added in v0.24.0
func (q *QuerierBuilder) WithEndpoints(endpoints ...string) *QuerierBuilder
func (*QuerierBuilder) WithExemplarAddresses ¶ added in v0.22.0
func (q *QuerierBuilder) WithExemplarAddresses(exemplarAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithExternalPrefix ¶ added in v0.22.0
func (q *QuerierBuilder) WithExternalPrefix(externalPrefix string) *QuerierBuilder
func (*QuerierBuilder) WithFileSDStoreAddresses ¶ added in v0.22.0
func (q *QuerierBuilder) WithFileSDStoreAddresses(fileSDStoreAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithImage ¶ added in v0.24.0
func (q *QuerierBuilder) WithImage(image string) *QuerierBuilder
func (*QuerierBuilder) WithMetadataAddresses ¶ added in v0.22.0
func (q *QuerierBuilder) WithMetadataAddresses(metadataAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithRoutePrefix ¶ added in v0.22.0
func (q *QuerierBuilder) WithRoutePrefix(routePrefix string) *QuerierBuilder
func (*QuerierBuilder) WithRuleAddresses ¶ added in v0.22.0
func (q *QuerierBuilder) WithRuleAddresses(ruleAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithTargetAddresses ¶ added in v0.22.0
func (q *QuerierBuilder) WithTargetAddresses(targetAddresses ...string) *QuerierBuilder
func (*QuerierBuilder) WithTracingConfig ¶ added in v0.22.0
func (q *QuerierBuilder) WithTracingConfig(tracingConfig string) *QuerierBuilder