api

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemberlistStatusHandler

func MemberlistStatusHandler(httpPathPrefix string, kvs *memberlist.KVInitService) http.Handler

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config, s *server.Server, grpcGatewayMux *grpcgw.ServeMux, logger log.Logger) (*API, error)

func (*API) RegisterAPI

func (a *API) RegisterAPI(statusService statusv1.StatusServiceServer) error

RegisterAPI registers the standard endpoints associated with a running Mimir.

func (*API) RegisterAgent

func (a *API) RegisterAgent(ag *agent.Agent) error

RegisterAgent registers the endpoints associated with the agent.

func (*API) RegisterDistributor

func (a *API) RegisterDistributor(d *distributor.Distributor)

RegisterDistributor registers the endpoints associated with the distributor.

func (*API) RegisterIngester

func (a *API) RegisterIngester(svc *ingester.Ingester)

RegisterIngester registers the endpoints associated with the ingester.

func (*API) RegisterMemberlistKV

func (a *API) RegisterMemberlistKV(pathPrefix string, kvs *memberlist.KVInitService)

RegisterMemberlistKV registers the endpoints associated with the memberlist KV store.

func (*API) RegisterOverridesExporter

func (a *API) RegisterOverridesExporter(oe *exporter.OverridesExporter)

RegisterOverridesExporter registers the endpoints associated with the overrides exporter.

func (*API) RegisterPyroscopeHandlers added in v0.6.1

func (a *API) RegisterPyroscopeHandlers(client querierv1connect.QuerierServiceClient)

func (*API) RegisterQuerier

func (a *API) RegisterQuerier(svc querierv1connect.QuerierServiceHandler)

RegisterQuerier registers the endpoints associated with the querier.

func (*API) RegisterQueryFrontend

func (a *API) RegisterQueryFrontend(frontendSvc *frontend.Frontend)

RegisterQueryFrontend registers the endpoints associated with the query frontend.

func (*API) RegisterQueryScheduler

func (a *API) RegisterQueryScheduler(s *scheduler.Scheduler)

RegisterQueryScheduler registers the endpoints associated with the query scheduler.

func (*API) RegisterRing

func (a *API) RegisterRing(r http.Handler)

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, 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 (a *API) RegisterRoutesWithPrefix(prefix string, handler http.Handler, auth, gzipEnabled bool, methods ...string)

func (*API) RegisterRuntimeConfig

func (a *API) RegisterRuntimeConfig(runtimeConfigHandler http.HandlerFunc, userLimitsHandler http.HandlerFunc)

RegisterRuntimeConfig registers the endpoints associates with the runtime configuration

func (*API) RegisterStoreGateway added in v0.6.1

func (a *API) RegisterStoreGateway(svc *storegateway.StoreGateway)

type Config

type Config struct {
	// The following configs are injected by the upstream caller.
	HTTPAuthMiddleware middleware.Interface `yaml:"-"`
	GrpcAuthMiddleware connect.Option       `yaml:"-"`
	BaseURL            string               `yaml:"base-url"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(fs *flag.FlagSet)

RegisterFlags registers api-related flags.

type IndexPageContent

type IndexPageContent struct {
	// contains filtered or unexported fields
}

IndexPageContent is a map of sections to path -> description.

func NewIndexPageContent

func NewIndexPageContent() *IndexPageContent
func (pc *IndexPageContent) AddLinks(weight int, groupDesc string, links []IndexPageLink)

func (*IndexPageContent) GetContent

func (pc *IndexPageContent) GetContent() []IndexPageLinkGroup
type IndexPageLink struct {
	Desc      string
	Path      string
	Dangerous bool
}

type IndexPageLinkGroup

type IndexPageLinkGroup struct {
	Desc  string
	Links []IndexPageLink
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL