healthcheck

package
v1.8.1-0...-791fd1a Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(_ *logger.Logger, checker checker) *cli.Command

NewCommand creates `healthcheck` command.

Types

type HTTPHealthChecker

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

HTTPHealthChecker is HTTP probe checker.

func NewHTTPHealthChecker

func NewHTTPHealthChecker(opts ...HealthCheckerOption) *HTTPHealthChecker

func (*HTTPHealthChecker) Check

func (c *HTTPHealthChecker) Check(ctx context.Context, baseURL string) error

Check performs HTTP get request.

type HealthCheckerOption

type HealthCheckerOption func(*HTTPHealthChecker)

HealthCheckerOption allows you to change some settings of the checker.

func WithHttpClient

func WithHttpClient(c httpClient) HealthCheckerOption

WithHttpClient allows to set http client.

func WithLiveEndpoint

func WithLiveEndpoint(endpoint string) HealthCheckerOption

WithLiveEndpoint set the endpoint to check.

Jump to

Keyboard shortcuts

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