health

package
v0.0.0-...-bb60f61 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package health contains an HTTP server that renders a basic HTML UI displaying the results of health checks of kubernetes pods that have special annotations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	transport.HTTP
	// contains filtered or unexported fields
}

The HTTP type is responsible for handling inbound HTTP requests to display the health check user-interface.

func NewHTTP

func NewHTTP(scraper Scraper) *HTTP

NewHTTP returns a new instance of the HTTP type that will scrape pod health using the provided Scraper implementation.

func (*HTTP) Get

func (t *HTTP) Get(w http.ResponseWriter, r *http.Request)

Get handles an inbound HTTP GET request that performs a health scrape and renders the health check UI.

func (*HTTP) Register

func (t *HTTP) Register(r *mux.Router)

Register HTTP handlers on the provided mux.Router.

type Scraper

type Scraper interface {
	Scrape(ctx context.Context) ([]*scrape.PodHealth, error)
}

The Scraper interface describes types that scrape kubernetes pods for their current health.

Directories

Path Synopsis
Package scrape contains logic for scraping the health check endpoints of kubernetes pods that have specified the required annotations.
Package scrape contains logic for scraping the health check endpoints of kubernetes pods that have specified the required annotations.

Jump to

Keyboard shortcuts

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