Documentation ¶
Index ¶
- Constants
- func DefaultConfigHandler(actualCfg interface{}, defaultCfg interface{}) http.HandlerFunc
- func NewQuerierHandler(cfg Config, queryable storage.SampleAndChunkQueryable, ...) http.Handler
- type API
- func (a *API) DisableServerHTTPTimeouts(next http.Handler) http.Handler
- func (a *API) RegisterAPI(httpPathPrefix string, actualCfg interface{}, defaultCfg interface{}, ...)
- func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, apiEnabled bool, ...)
- func (a *API) RegisterBlockBuilderScheduler(s bbschedulerpb.BlockBuilderSchedulerServer)
- func (a *API) RegisterCompactor(c *compactor.MultitenantCompactor)
- func (a *API) RegisterDeprecatedRoute(path string, handler http.Handler, auth, gzipEnabled bool, method string, ...)
- func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config, ...)
- func (a *API) RegisterIngester(i Ingester)
- func (a *API) RegisterIngesterPartitionRing(r http.Handler)
- func (a *API) RegisterIngesterRing(r http.Handler)
- func (a *API) RegisterMemberlistKV(pathPrefix string, kvs *memberlist.KVInitService)
- func (a *API) RegisterOverridesExporter(oe *exporter.OverridesExporter)
- func (a *API) RegisterQueryAPI(handler http.Handler, buildInfoHandler http.Handler)
- func (a *API) RegisterQueryFrontend1(f *frontendv1.Frontend)
- func (a *API) RegisterQueryFrontend2(f *frontendv2.Frontend)
- func (a *API) RegisterQueryFrontendHandler(h http.Handler, buildInfoHandler http.Handler)
- func (a *API) RegisterQueryScheduler(f *scheduler.Scheduler)
- func (a *API) RegisterQueryable(distributor Distributor)
- func (a *API) RegisterRoute(path string, handler http.Handler, auth, gzipEnabled bool, method string, ...)
- func (a *API) RegisterRoutesWithPrefix(prefix string, handler http.Handler, auth, gzipEnabled bool, methods ...string)
- func (a *API) RegisterRuler(r *ruler.Ruler)
- func (a *API) RegisterRulerAPI(r *ruler.API, configAPIEnabled bool, buildInfoHandler http.Handler)
- func (a *API) RegisterRuntimeConfig(runtimeConfigHandler http.HandlerFunc, userLimitsHandler http.HandlerFunc)
- func (a *API) RegisterServiceMapHandler(handler http.Handler)
- func (a *API) RegisterStoreGateway(s *storegateway.StoreGateway)
- type Config
- type ConfigHandler
- type Distributor
- type IndexPageContent
- type IndexPageLink
- type IndexPageLinkGroup
- type Ingester
Constants ¶
const OTLPPushEndpoint = "/otlp/v1/metrics"
const PrometheusPushEndpoint = "/api/v1/push"
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigHandler ¶
func DefaultConfigHandler(actualCfg interface{}, defaultCfg interface{}) http.HandlerFunc
func NewQuerierHandler ¶
func NewQuerierHandler( cfg Config, queryable storage.SampleAndChunkQueryable, exemplarQueryable storage.ExemplarQueryable, metadataSupplier querier.MetadataSupplier, engine promql.QueryEngine, distributor Distributor, reg prometheus.Registerer, logger log.Logger, limits *validation.Overrides, ) http.Handler
NewQuerierHandler returns a HTTP handler that can be used by the querier service to either register with the frontend worker query processor or with the external HTTP server to fulfill the Prometheus query API.
Types ¶
type API ¶
type API struct { AuthMiddleware middleware.Interface // contains filtered or unexported fields }
func (*API) DisableServerHTTPTimeouts ¶
func (*API) RegisterAPI ¶
func (a *API) RegisterAPI(httpPathPrefix string, actualCfg interface{}, defaultCfg interface{}, buildInfoHandler http.Handler)
RegisterAPI registers the standard endpoints associated with a running Mimir.
func (*API) RegisterAlertmanager ¶
func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, apiEnabled bool, grafanaCompatEnabled bool, buildInfoHandler http.Handler)
RegisterAlertmanager registers endpoints that are associated with the alertmanager.
func (*API) RegisterBlockBuilderScheduler ¶
func (a *API) RegisterBlockBuilderScheduler(s bbschedulerpb.BlockBuilderSchedulerServer)
func (*API) RegisterCompactor ¶
func (a *API) RegisterCompactor(c *compactor.MultitenantCompactor)
RegisterCompactor registers routes associated with the compactor.
func (*API) RegisterDeprecatedRoute ¶
func (a *API) RegisterDeprecatedRoute(path string, handler http.Handler, auth, gzipEnabled bool, method string, methods ...string)
RegisterDeprecatedRoute behaves in a similar way to RegisterRoute. RegisterDeprecatedRoute also logs warnings on invocations of the deprecated endpoints.
func (*API) RegisterDistributor ¶
func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config, reg prometheus.Registerer, limits *validation.Overrides)
RegisterDistributor registers the endpoints associated with the distributor.
func (*API) RegisterIngester ¶
RegisterIngester registers the ingester HTTP and gRPC services.
func (*API) RegisterIngesterPartitionRing ¶
RegisterIngesterPartitionRing registers the ring UI page associated with the ingester partitions ring.
func (*API) RegisterIngesterRing ¶
RegisterIngesterRing registers the ring UI page associated with the ingesters ring.
func (*API) RegisterMemberlistKV ¶
func (a *API) RegisterMemberlistKV(pathPrefix string, kvs *memberlist.KVInitService)
func (*API) RegisterOverridesExporter ¶
func (a *API) RegisterOverridesExporter(oe *exporter.OverridesExporter)
func (*API) RegisterQueryAPI ¶
RegisterQueryAPI registers the Prometheus API routes with the provided handler.
func (*API) RegisterQueryFrontend1 ¶
func (a *API) RegisterQueryFrontend1(f *frontendv1.Frontend)
func (*API) RegisterQueryFrontend2 ¶
func (a *API) RegisterQueryFrontend2(f *frontendv2.Frontend)
func (*API) RegisterQueryFrontendHandler ¶
RegisterQueryFrontendHandler registers the Prometheus routes supported by the Mimir querier service. Currently, this can not be registered simultaneously with the Querier.
func (*API) RegisterQueryScheduler ¶
func (*API) RegisterQueryable ¶
func (a *API) RegisterQueryable(distributor Distributor)
RegisterQueryable registers the default routes associated with the querier module.
func (*API) RegisterRoute ¶
func (a *API) RegisterRoute(path string, handler http.Handler, auth, gzipEnabled bool, method string, methods ...string)
RegisterRoute registers a single route enforcing HTTP methods. A single route is expected to be specific about which HTTP methods are supported.
func (*API) RegisterRoutesWithPrefix ¶
func (*API) RegisterRuler ¶
RegisterRuler registers routes associated with the Ruler service.
func (*API) RegisterRulerAPI ¶
RegisterRulerAPI registers routes associated with the Ruler API
func (*API) RegisterRuntimeConfig ¶
func (a *API) RegisterRuntimeConfig(runtimeConfigHandler http.HandlerFunc, userLimitsHandler http.HandlerFunc)
RegisterRuntimeConfig registers the endpoints associates with the runtime configuration
func (*API) RegisterServiceMapHandler ¶
RegisterServiceMapHandler registers the Mimir structs service handler TODO: Refactor this code to be accomplished using the services.ServiceManager or a future module manager #2291
func (*API) RegisterStoreGateway ¶
func (a *API) RegisterStoreGateway(s *storegateway.StoreGateway)
RegisterStoreGateway registers the ring UI page associated with the store-gateway.
type Config ¶
type Config struct { SkipLabelNameValidationHeader bool `yaml:"skip_label_name_validation_header_enabled" category:"advanced"` SkipLabelCountValidationHeader bool `yaml:"skip_label_count_validation_header_enabled" category:"advanced"` AlertmanagerHTTPPrefix string `yaml:"alertmanager_http_prefix" category:"advanced"` PrometheusHTTPPrefix string `yaml:"prometheus_http_prefix" category:"advanced"` // The following configs are injected by the upstream caller. ServerPrefix string `yaml:"-"` HTTPAuthMiddleware middleware.Interface `yaml:"-"` // The CustomConfigHandler allows for providing a different handler for the // `/config` endpoint. If this field is set _before_ the API module is // initialized, the custom config handler will be used instead of // DefaultConfigHandler. CustomConfigHandler ConfigHandler `yaml:"-"` }
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet.
type ConfigHandler ¶
type ConfigHandler func(actualCfg interface{}, defaultCfg interface{}) http.HandlerFunc
type Distributor ¶
type Distributor interface { querier.Distributor UserStatsHandler(w http.ResponseWriter, r *http.Request) }
type IndexPageContent ¶
type IndexPageContent struct {
// contains filtered or unexported fields
}
IndexPageContent is a map of sections to path -> description.
func (*IndexPageContent) AddLinks ¶
func (pc *IndexPageContent) AddLinks(weight int, groupDesc string, links []IndexPageLink)
func (*IndexPageContent) GetContent ¶
func (pc *IndexPageContent) GetContent() []IndexPageLinkGroup
type IndexPageLink ¶
type IndexPageLinkGroup ¶
type IndexPageLinkGroup struct { Desc string Links []IndexPageLink // contains filtered or unexported fields }
type Ingester ¶
type Ingester interface { client.IngesterServer FlushHandler(http.ResponseWriter, *http.Request) ShutdownHandler(http.ResponseWriter, *http.Request) PrepareShutdownHandler(http.ResponseWriter, *http.Request) PreparePartitionDownscaleHandler(http.ResponseWriter, *http.Request) PrepareUnregisterHandler(w http.ResponseWriter, r *http.Request) UserRegistryHandler(http.ResponseWriter, *http.Request) TenantsHandler(http.ResponseWriter, *http.Request) TenantTSDBHandler(http.ResponseWriter, *http.Request) PrepareInstanceRingDownscaleHandler(http.ResponseWriter, *http.Request) }
Ingester is defined as an interface to allow for alternative implementations of ingesters to be passed into the API.RegisterIngester() method.