MCPcopy Index your code
hub / github.com/cortexproject/cortex / RegisterQueryable

Method RegisterQueryable

pkg/api/api.go:435–443  ·  view source on GitHub ↗

RegisterQueryable registers the default routes associated with the querier module.

(
	queryable storage.SampleAndChunkQueryable,
	distributor Distributor,
)

Source from the content-addressed store, hash-verified

433// RegisterQueryable registers the default routes associated with the querier
434// module.
435func (a *API) RegisterQueryable(
436 queryable storage.SampleAndChunkQueryable,
437 distributor Distributor,
438) {
439 // these routes are always registered to the default server
440 a.RegisterRoute("/api/v1/user_stats", http.HandlerFunc(distributor.UserStatsHandler), true, "GET")
441
442 a.RegisterRoute(path.Join(a.cfg.LegacyHTTPPrefix, "/user_stats"), http.HandlerFunc(distributor.UserStatsHandler), true, "GET")
443}
444
445// RegisterQueryAPI registers the Prometheus API routes with the provided handler.
446func (a *API) RegisterQueryAPI(handler http.Handler) {

Callers 1

initQueryableMethod · 0.80

Calls 2

RegisterRouteMethod · 0.95
JoinMethod · 0.80

Tested by

no test coverage detected