server

package
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllTargetsByJob

func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]collectorJSON

GetAllTargetsByJob is a relatively expensive call that is usually only used for debugging purposes.

Types

type Server

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

func NewServer

func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr string) *Server

func (*Server) JobHandler

func (s *Server) JobHandler(c *gin.Context)

func (*Server) LivenessProbeHandler

func (s *Server) LivenessProbeHandler(c *gin.Context)

func (*Server) PrometheusMiddleware

func (s *Server) PrometheusMiddleware(c *gin.Context)

func (*Server) ReadinessProbeHandler

func (s *Server) ReadinessProbeHandler(c *gin.Context)

func (*Server) ScrapeConfigsHandler

func (s *Server) ScrapeConfigsHandler(c *gin.Context)

ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

func (*Server) TargetsHandler

func (s *Server) TargetsHandler(c *gin.Context)

func (*Server) UpdateScrapeConfigResponse

func (s *Server) UpdateScrapeConfigResponse(configs map[string]*promconfig.ScrapeConfig) error

UpdateScrapeConfigResponse updates the scrape config response. The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. After that, the YAML is converted in to a JSON format for consumers to use.

Jump to

Keyboard shortcuts

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