collector

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectID string
	Provider  content.Provider
	Netconf   internal.NetconfClient
}

type ConfigCheckerCollector

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

func New

func New(target string, config Config) *ConfigCheckerCollector

func (*ConfigCheckerCollector) Collect

func (c *ConfigCheckerCollector) Collect(ch chan<- prometheus.Metric)

func (*ConfigCheckerCollector) Describe

func (c *ConfigCheckerCollector) Describe(ch chan<- *prometheus.Desc)

type Handler

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

Handler is the HTTP handler for /check

func NewHandler

func NewHandler(projectID string, netconf internal.NetconfClient) *Handler

NewHandler returns a Handler with the specified configuration.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET requests to the /check endpoint, parsing the target parameter and delegating writing the actual response to promhttp.

Jump to

Keyboard shortcuts

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