healthcheck

package
v0.21.8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 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(w http.ResponseWriter, r *http.Request)

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, homeDir string) (DiskUsageResponse, error)

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

type Comet added in v0.15.0

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

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

func NewComet added in v0.15.0

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

func (*Comet) ServeHTTP added in v0.15.0

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

ServeHTTP implements http.Handler.

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.CometStatus, error)
}

Statuser can query the Comet status endpoint.

Jump to

Keyboard shortcuts

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