healthcheck

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package healthcheck tests and communicates the health of the AlloyDB 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 alloydb.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, _ *http.Request)

HandleReadiness ensures the Check has been notified of successful startup, that the proxy has not reached maximum connections, and that the Proxy has not started shutting down.

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.

func (*Check) NotifyStopped added in v1.10.0

func (c *Check) NotifyStopped()

NotifyStopped notifies the check that the proxy has initiated its shutdown sequence.

Jump to

Keyboard shortcuts

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