api

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: AGPL-3.0 Imports: 61 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 Pyroscope.

func (*API) RegisterAdHocProfiles

func (a *API) RegisterAdHocProfiles(ahp *adhocprofiles.AdHocProfiles)

func (*API) RegisterAdmin

func (a *API) RegisterAdmin(ad AdminService)

func (*API) RegisterCatchAll

func (a *API) RegisterCatchAll() error

func (*API) RegisterCompactor

func (a *API) RegisterCompactor(c *compactor.MultitenantCompactor)

RegisterCompactor registers routes associated with the compactor.

func (*API) RegisterDebugInfo

func (a *API) RegisterDebugInfo(svc debuginfov1alpha1connect.DebuginfoServiceHandler, uploadHandler http.Handler)

func (*API) RegisterDistributor

func (a *API) RegisterDistributor(d *distributor.Distributor, limits *validation.Overrides, cfg server.Config)

RegisterDistributor registers the endpoints associated with the distributor.

func (*API) RegisterFeatureFlagsServiceHandler

func (a *API) RegisterFeatureFlagsServiceHandler(svc capabilitiesv1connect.FeatureFlagsServiceHandler)

func (*API) RegisterFrontendForQuerierHandler

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

RegisterFrontendForQuerierHandler registers the endpoints associated with the query frontend.

func (*API) RegisterIngester

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

RegisterIngester registers the endpoints associated with the ingester.

func (*API) RegisterIngesterRing

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

RegisterIngesterRing registers the ring UI page associated with the distributor for writes.

func (*API) RegisterMemberlistKV

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

RegisterMemberlistKV registers the endpoints associated with the memberlist KV store.

func (*API) RegisterMetastoreAdmin

func (a *API) RegisterMetastoreAdmin(adm *metastoreadmin.Admin)

func (*API) RegisterOverridesExporter

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

RegisterOverridesExporter registers the endpoints associated with the overrides exporter.

func (*API) RegisterPyroscopeHandlers

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

func (*API) RegisterQuerierServiceHandler

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

func (*API) RegisterQueryBackend

func (a *API) RegisterQueryBackend(svc *querybackend.QueryBackend)

func (*API) RegisterQueryDiagnosticsAdmin

func (a *API) RegisterQueryDiagnosticsAdmin(adm *querydiagnostics.Admin)

func (*API) RegisterQueryScheduler

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

RegisterQueryScheduler registers the endpoints associated with the query scheduler.

func (*API) RegisterReadyHandler

func (a *API) RegisterReadyHandler(handler http.Handler)

func (*API) RegisterRedirectToAdmin

func (a *API) RegisterRedirectToAdmin()

func (*API) RegisterRoute

func (a *API) RegisterRoute(path string, handler http.Handler, registerOpts ...RegisterOption)

registerRoute registers an HTTP handler with the main HTTP server.

Register Options allow to filter the HTTP methods and apply middlewares.

func (*API) RegisterRuntimeConfig

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

RegisterRuntimeConfig registers the endpoints associates with the runtime configuration

func (*API) RegisterSegmentWriter

func (a *API) RegisterSegmentWriter(svc *segmentwriter.SegmentWriterService)

func (*API) RegisterSegmentWriterRing

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

RegisterSegmentWriterRing registers the ring UI page associated with the distributor for writes.

func (*API) RegisterStoreGateway

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

func (*API) RegisterTenantSettings

func (a *API) RegisterTenantSettings(ts *settings.TenantSettings)

func (*API) RegisterVCSServiceHandler

func (a *API) RegisterVCSServiceHandler(svc vcsv1connect.VCSServiceHandler)

func (*API) RegisterVersion

func (a *API) RegisterVersion(svc versionv1connect.VersionHandler)

RegisterVersion registers the endpoints associated with the versions service.

func (*API) WithArtificialDelayMiddleware

func (a *API) WithArtificialDelayMiddleware(limits delayhandler.Limits) RegisterOption

func (*API) WithAuthMiddleware

func (a *API) WithAuthMiddleware() RegisterOption

func (*API) WithBodySizeLimitMiddleware

func (a *API) WithBodySizeLimitMiddleware(limits body.Limits) RegisterOption

type AdminService

type AdminService interface {
	TenantsHandler(w http.ResponseWriter, r *http.Request)
	BlocksHandler(w http.ResponseWriter, r *http.Request)
	BlockHandler(w http.ResponseWriter, r *http.Request)
	DatasetHandler(w http.ResponseWriter, r *http.Request)
	DatasetProfilesHandler(w http.ResponseWriter, r *http.Request)
	ProfileDownloadHandler(w http.ResponseWriter, r *http.Request)
	ProfileCallTreeHandler(w http.ResponseWriter, r *http.Request)
	DatasetTSDBIndexHandler(w http.ResponseWriter, r *http.Request)
	DatasetSymbolsHandler(w http.ResponseWriter, r *http.Request)
}

AdminService is an interface for admin handlers (v1 and v2)

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
}

type RegisterOption

type RegisterOption func(*registerParams)

func WithGzipMiddleware

func WithGzipMiddleware() RegisterOption

func WithMethod

func WithMethod(method string) RegisterOption

func WithPrefix

func WithPrefix() RegisterOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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