health

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatLatency

func FormatLatency(d time.Duration) string

FormatLatency formats a duration for display (in milliseconds only)

Types

type HTTPStatus

type HTTPStatus struct {
	URL       string
	Available bool
	Latency   time.Duration
	Error     error
}

HTTPStatus represents the status of an HTTP health check

func CheckHTTP

func CheckHTTP(url string) HTTPStatus

CheckHTTP performs an HTTP health check

type PortStatus

type PortStatus struct {
	Port    int
	Open    bool
	Latency time.Duration
}

PortStatus represents the status of a port check

func CheckPort

func CheckPort(port int) PortStatus

CheckPort checks if a port is open on localhost

Jump to

Keyboard shortcuts

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