api

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 46 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 added in v1.4.0

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

func (*API) RegisterAdmin added in v1.2.1

func (a *API) RegisterAdmin(ad *operations.Admin)

func (*API) RegisterCatchAll

func (a *API) RegisterCatchAll() error

func (*API) RegisterCompactor added in v1.2.0

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

RegisterCompactor registers routes associated with the compactor.

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

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

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

func (*API) RegisterTenantSettings added in v1.2.1

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

func (*API) RegisterVersion added in v1.2.1

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

RegisterVersion registers the endpoints associated with the versions service.

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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