RegisterAPI registers the standard endpoints associated with a running Cortex.
(httpPathPrefix string, actualCfg any, defaultCfg any)
| 266 | |
| 267 | // RegisterAPI registers the standard endpoints associated with a running Cortex. |
| 268 | func (a *API) RegisterAPI(httpPathPrefix string, actualCfg any, defaultCfg any) { |
| 269 | a.indexPage.AddLink(SectionAdminEndpoints, "/config", "Current Config (including the default values)") |
| 270 | a.indexPage.AddLink(SectionAdminEndpoints, "/config?mode=diff", "Current Config (show only values that differ from the defaults)") |
| 271 | |
| 272 | a.RegisterRoute("/config", a.cfg.configHandler(actualCfg, defaultCfg), false, "GET") |
| 273 | a.RegisterRoute("/", indexHandler(httpPathPrefix, a.indexPage), false, "GET") |
| 274 | a.RegisterRoute("/debug/fgprof", fgprof.Handler(), false, "GET") |
| 275 | } |
| 276 | |
| 277 | // RegisterRuntimeConfig registers the endpoints associates with the runtime configuration |
| 278 | func (a *API) RegisterRuntimeConfig(runtimeConfigHandler http.HandlerFunc) { |
no test coverage detected