Documentation ¶
Index ¶
- func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]collectorJSON
- type Server
- func (s *Server) JobHandler(c *gin.Context)
- func (s *Server) LivenessProbeHandler(c *gin.Context)
- func (s *Server) PrometheusMiddleware(c *gin.Context)
- func (s *Server) ReadinessProbeHandler(c *gin.Context)
- func (s *Server) ScrapeConfigsHandler(c *gin.Context)
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) Start() error
- func (s *Server) TargetsHandler(c *gin.Context)
- func (s *Server) UpdateScrapeConfigResponse(configs map[string]*promconfig.ScrapeConfig) error
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 (*Server) JobHandler ¶
func (*Server) LivenessProbeHandler ¶
func (*Server) PrometheusMiddleware ¶
func (*Server) ReadinessProbeHandler ¶
func (*Server) ScrapeConfigsHandler ¶
ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator.
func (*Server) TargetsHandler ¶
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.
Click to show internal directories.
Click to hide internal directories.