health

package
Version: v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckDetails

type CheckDetails struct {
	OK             bool
	Errors         []string
	Namespace      string
	LastRun        time.Time // the time the check last was last run
	AuthorativePod string    // the pod that last ran the check
}

CheckDetails contains details about a single check's current status

func NewCheckDetails

func NewCheckDetails() CheckDetails

NewCheckDetails creates a new CheckDetails struct

type State

type State struct {
	OK            bool
	Errors        []string
	CheckDetails  map[string]CheckDetails // map of check names to last run timestamp
	CurrentMaster string
}

State returns the results of checks to the client calling Kuberhealthy. This is displayed on the kuberhealthy status page as JSON

func NewState

func NewState() State

NewState creates a new health check result response

func (*State) AddError

func (h *State) AddError(s ...string)

AddError adds new errors to State

func (*State) WriteHTTPStatusResponse

func (h *State) WriteHTTPStatusResponse(w http.ResponseWriter) error

WriteHTTPStatusResponse writes a response to an http response writer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL