healthcheck

package
v0.0.0-...-f2f38ec Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownHealthCheckType = errors.New("unknown health check type")
	ErrUnexpectedStatusCode   = errors.New("unexpected status code")
	ErrUnexpectedICMPType     = errors.New("unexpected ICMP message type")
)

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check(ip string) error
}

func NewChecker

func NewChecker(hc config.HealthCheck) (Checker, error)

type HttpChecker

type HttpChecker struct {
	Endpoint           string
	Host               string
	Timeout            time.Duration
	Scheme             string
	InsecureSkipVerify bool
	Headers            map[string]string
}

func (*HttpChecker) Check

func (h *HttpChecker) Check(ip string) error

type IcmpChecker

type IcmpChecker struct {
	Timeout time.Duration
}

func (*IcmpChecker) Check

func (i *IcmpChecker) Check(ip string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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