healthcheck

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHealthChecker

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

func NewCommandHealthChecker

func NewCommandHealthChecker(command string, interval time.Duration) *CommandHealthChecker

func (*CommandHealthChecker) GetHealthCheckMessage

func (c *CommandHealthChecker) GetHealthCheckMessage(context.Context) (messageRows []string, rows int)

func (*CommandHealthChecker) Start

func (c *CommandHealthChecker) Start(ctx context.Context)

type HTTPHealthCheckData

type HTTPHealthCheckData struct {
	URL        string
	StatusCode int
	Error      string
	Body       string
}

type HTTPHealthChecker

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

func NewHTTPHealthChecker

func NewHTTPHealthChecker(u, t string, interval time.Duration) (*HTTPHealthChecker, error)

func (*HTTPHealthChecker) GetHealthCheckMessage

func (c *HTTPHealthChecker) GetHealthCheckMessage(context.Context) (messageRows []string, rows int)

func (*HTTPHealthChecker) Start

func (c *HTTPHealthChecker) Start(ctx context.Context)

type HealthChecker

type HealthChecker interface {
	Start(ctx context.Context)
	GetHealthCheckMessage(ctx context.Context) (messageRows []string, rows int)
}

func HealthCheckFactory

func HealthCheckFactory(cfg config.StatusCheckConfig) (HealthChecker, error)

Jump to

Keyboard shortcuts

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