Documentation
¶
Index ¶
- type API
- func (a *API) RegisterAPI(cfg interface{})
- func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, target bool)
- func (a *API) RegisterCompactor(c *compactor.Compactor)
- func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config)
- func (a *API) RegisterIngester(i *ingester.Ingester, pushConfig distributor.Config)
- func (a *API) RegisterPurger(store *purger.DeleteStore, deleteRequestCancelPeriod time.Duration)
- func (a *API) RegisterQuerier(queryable storage.Queryable, engine *promql.Engine, ...) http.Handler
- func (a *API) RegisterQueryFrontend(f *frontend.Frontend)
- func (a *API) RegisterRing(r *ring.Ring)
- func (a *API) RegisterRoute(path string, handler http.Handler, auth bool, methods ...string)
- func (a *API) RegisterRoutesWithPrefix(prefix string, handler http.Handler, auth bool, methods ...string)
- func (a *API) RegisterRuler(r *ruler.Ruler, apiEnabled bool)
- func (a *API) RegisterServiceMapHandler(handler http.Handler)
- func (a *API) RegisterStoreGateway(s *storegateway.StoreGateway)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) RegisterAPI ¶
func (a *API) RegisterAPI(cfg interface{})
RegisterAPI registers the standard endpoints associated with a running Cortex.
func (*API) RegisterAlertmanager ¶
func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, target bool)
RegisterAlertmanager registers endpoints associated with the alertmanager. It will only serve endpoints using the legacy http-prefix if it is not run as a single binary.
func (*API) RegisterCompactor ¶
func (a *API) RegisterCompactor(c *compactor.Compactor)
RegisterCompactor registers the ring UI page associated with the compactor.
func (*API) RegisterDistributor ¶
func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config)
RegisterDistributor registers the endpoints associated with the distributor.
func (*API) RegisterIngester ¶
func (a *API) RegisterIngester(i *ingester.Ingester, pushConfig distributor.Config)
RegisterIngester registers the ingesters HTTP and GRPC service
func (*API) RegisterPurger ¶
func (a *API) RegisterPurger(store *purger.DeleteStore, deleteRequestCancelPeriod time.Duration)
RegisterPurger registers the endpoints associated with the Purger/DeleteStore. They do not exactly match the Prometheus API but mirror it closely enough to justify their routing under the Prometheus component/
func (*API) RegisterQuerier ¶
func (a *API) RegisterQuerier(
queryable storage.Queryable,
engine *promql.Engine,
distributor *distributor.Distributor,
registerRoutesExternally bool,
tombstonesLoader *purger.TombstonesLoader,
querierRequestDuration *prometheus.HistogramVec,
) http.Handler
RegisterQuerier registers the Prometheus routes supported by the Cortex querier service. Currently this can not be registered simultaneously with the QueryFrontend.
func (*API) RegisterQueryFrontend ¶
func (a *API) RegisterQueryFrontend(f *frontend.Frontend)
RegisterQueryFrontend registers the Prometheus routes supported by the Cortex querier service. Currently this can not be registered simultaneously with the Querier.
func (*API) RegisterRing ¶
func (a *API) RegisterRing(r *ring.Ring)
// RegisterRing registers the ring UI page associated with the distributor for writes.
func (*API) RegisterRoute ¶
func (a *API) RegisterRoute(path string, handler http.Handler, auth bool, methods ...string)
func (*API) RegisterRoutesWithPrefix ¶
func (a *API) RegisterRoutesWithPrefix(prefix string, handler http.Handler, auth bool, methods ...string)
func (*API) RegisterRuler ¶
func (a *API) RegisterRuler(r *ruler.Ruler, apiEnabled bool)
RegisterRuler registers routes associated with the Ruler service. If the API is not enabled only the ring route is registered.
func (*API) RegisterServiceMapHandler ¶
func (a *API) RegisterServiceMapHandler(handler http.Handler)
RegisterServiceMapHandler registers the Cortex 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 {
AlertmanagerHTTPPrefix string `yaml:"alertmanager_http_prefix"`
PrometheusHTTPPrefix string `yaml:"prometheus_http_prefix"`
// The following configs are injected by the upstream caller.
ServerPrefix string `yaml:"-"`
LegacyHTTPPrefix string `yaml:"-"`
HTTPAuthMiddleware middleware.Func `yaml:"-"`
}
func (*Config) RegisterFlags ¶
func (cfg *Config) RegisterFlags(f *flag.FlagSet)
RegisterFlags adds the flags required to config this to the given FlagSet.
func (*Config) RegisterFlagsWithPrefix ¶
func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet with the set prefix.