healthcheck

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package healthcheck tests and communicates the health of the Cloud SQL Auth proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

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

Check provides HTTP handlers for use as healthchecks typically in a Kubernetes context.

func NewCheck

func NewCheck(p *proxy.Client, l cloudsql.Logger) *Check

NewCheck is the initializer for Check.

func (*Check) HandleLiveness

func (c *Check) HandleLiveness(w http.ResponseWriter, _ *http.Request)

HandleLiveness indicates the process is up and responding to HTTP requests. If this check fails (because it's not reachable), the process is in a bad state and should be restarted.

func (*Check) HandleReadiness

func (c *Check) HandleReadiness(w http.ResponseWriter, req *http.Request)

HandleReadiness ensures the Check has been notified of successful startup, that the proxy has not reached maximum connections, and that all connections are healthy.

func (*Check) HandleStartup

func (c *Check) HandleStartup(w http.ResponseWriter, _ *http.Request)

HandleStartup reports whether the Check has been notified of startup.

func (*Check) NotifyStarted

func (c *Check) NotifyStarted()

NotifyStarted notifies the check that the proxy has started up successfully.

Jump to

Keyboard shortcuts

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