health

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapHealthCheck

type BootstrapHealthCheck struct {
	Client      *api.Client
	ClusterSize int
}

BootstrapHealthCheck contains the resources and methods necessary to confirm an autopilot-enabled Consul cluster has reached a healthy state and assumed cluster leadership for a given Upgrade Version Tag

func (*BootstrapHealthCheck) IsHealthy

func (hc *BootstrapHealthCheck) IsHealthy(ctx context.Context) bool

IsHealthy analyzes a Consul cluster to determine several things: 1. Is the cluster reporting a healthy, internally consistent state? 2. Does the cluster have the expected number of nodes? 3. Are all nodes in the current Upgrade Version Tag group voting? 4. Is the cluster leader a member of the current Upgrade Version Tag group? 5. Have all remaining servers in the cluster released voter status?

type NodeHealthCheck

type NodeHealthCheck struct {
	Client *api.Client
}

NodeHealthCheck performs a simple cluster/node sign of life test. /v1/status/leader is queried. In the event the node is unable to respond, the node is live but there is no Raft leader, or the API otherwise returns an error, we evaluate the node as Unehalthy.

func (*NodeHealthCheck) IsHealthy

func (hc *NodeHealthCheck) IsHealthy() bool

IsHealthy implements the basic boolean test logic described above

Jump to

Keyboard shortcuts

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