healthcheck

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package healthcheck typically enables readiness or liveness probes within kubernetes. IMPORTANT: If you update this behavior, be sure to update internal/fullnode/pod_builder.go with the new cosmos operator image in the "healthcheck" container.

Index

Constants

View Source
const Port = 1251

Port is the port for the healthcheck sidecar.

Variables

This section is empty.

Functions

func DiskUsage added in v0.9.1

func DiskUsage(dir string) http.HandlerFunc

DiskUsage returns a handler which responds with disk statistics in JSON. Path is the filesystem path from which to check disk usage.

Types

type Client added in v0.10.0

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

Client can be used to query healthcheck information.

func NewClient added in v0.10.0

func NewClient(client *http.Client) *Client

func (Client) DiskUsage added in v0.10.0

func (c Client) DiskUsage(ctx context.Context, host string) (DiskUsageResponse, error)

DiskUsage returns disk usage statistics or an error if unable to obtain. Do not include the port in the host.

type DiskUsageResponse added in v0.9.1

type DiskUsageResponse struct {
	Dir       string `json:"dir"`
	AllBytes  uint64 `json:"all_bytes,omitempty"`
	FreeBytes uint64 `json:"free_bytes,omitempty"`
	Error     string `json:"error,omitempty"`
}

DiskUsageResponse returns disk statistics in bytes.

type Statuser

type Statuser interface {
	Status(ctx context.Context, rpcHost string) (cosmos.TendermintStatus, error)
}

Statuser can query the Tendermint status endpoint.

type Tendermint

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

Tendermint checks the Tendermint status endpoint to determine if the node is in-sync or not.

func NewTendermint

func NewTendermint(logger logr.Logger, client Statuser, rpcHost string, timeout time.Duration) *Tendermint

func (*Tendermint) ServeHTTP

func (h *Tendermint) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

Jump to

Keyboard shortcuts

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