Documentation ¶
Index ¶
- Constants
- func NewQuerierHandler(cfg Config, queryable storage.SampleAndChunkQueryable, engine *promql.Engine, ...) http.Handler
- type API
- func (a *API) RegisterAPI(httpPathPrefix string, cfg interface{})
- func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, target, apiEnabled bool)
- func (a *API) RegisterCompactor(c *compactor.Compactor)
- func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config)
- func (a *API) RegisterIngester(i Ingester, pushConfig distributor.Config)
- func (a *API) RegisterPurger(store *purger.DeleteStore, deleteRequestCancelPeriod time.Duration)
- func (a *API) RegisterQueryAPI(handler http.Handler)
- func (a *API) RegisterQueryFrontend(f *frontend.Frontend)
- func (a *API) RegisterQueryable(queryable storage.SampleAndChunkQueryable, ...)
- func (a *API) RegisterRing(r *ring.Ring)
- func (a *API) RegisterRoute(path string, handler http.Handler, auth bool, method string, methods ...string)
- func (a *API) RegisterRoutesWithPrefix(prefix string, handler http.Handler, auth bool, methods ...string)
- func (a *API) RegisterRuler(r *ruler.Ruler)
- func (a *API) RegisterRulerAPI(r *ruler.API)
- func (a *API) RegisterServiceMapHandler(handler http.Handler)
- func (a *API) RegisterStoreGateway(s *storegateway.StoreGateway)
- type Config
- type IndexPageContent
- type Ingester
Constants ¶
const ( SectionAdminEndpoints = "Admin Endpoints:" SectionDangerous = "Dangerous:" )
Variables ¶
This section is empty.
Functions ¶
func NewQuerierHandler ¶
func NewQuerierHandler( cfg Config, queryable storage.SampleAndChunkQueryable, engine *promql.Engine, distributor *distributor.Distributor, tombstonesLoader *purger.TombstonesLoader, reg prometheus.Registerer, logger log.Logger, ) 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) RegisterAPI ¶
RegisterAPI registers the standard endpoints associated with a running Cortex.
func (*API) RegisterAlertmanager ¶
func (a *API) RegisterAlertmanager(am *alertmanager.MultitenantAlertmanager, target, apiEnabled 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 ¶
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, 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) RegisterQueryAPI ¶
RegisterQueryAPI registers the Prometheus API routes with the provided handler.
func (*API) RegisterQueryFrontend ¶
RegisterQueryFrontend registers the Prometheus routes supported by the Cortex querier service. Currently this can not be registered simultaneously with the Querier.
func (*API) RegisterQueryable ¶
func (a *API) RegisterQueryable( queryable storage.SampleAndChunkQueryable, distributor *distributor.Distributor, )
RegisterQueryable registers the the default routes associated with the querier module.
func (*API) RegisterRing ¶
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, 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) RegisterServiceMapHandler ¶
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.Interface `yaml:"-"` }
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet.
type IndexPageContent ¶
type IndexPageContent struct {
// contains filtered or unexported fields
}
IndexPageContent is a map of sections to path -> description.
func (*IndexPageContent) AddLink ¶
func (pc *IndexPageContent) AddLink(section, path, description string)
func (*IndexPageContent) GetContent ¶
func (pc *IndexPageContent) GetContent() map[string]map[string]string
type Ingester ¶
type Ingester interface { client.IngesterServer FlushHandler(http.ResponseWriter, *http.Request) ShutdownHandler(http.ResponseWriter, *http.Request) Push(context.Context, *client.WriteRequest) (*client.WriteResponse, error) }
Ingester is defined as an interface to allow for alternative implementations of ingesters to be passed into the API.RegisterIngester() method.