healthcheck

package
v0.0.0-...-ddd9f4d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHTTPStatusNotOK = errors.New("HTTP response status is not OK")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(httpClient *http.Client) *Client

func (*Client) Check

func (c *Client) Check(ctx context.Context, url string) error

type Logger

type Logger interface {
	Debug(s string)
	Info(s string)
	Error(s string)
}

type Server

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

func NewServer

func NewServer(config settings.Health,
	logger Logger, vpnLoop StatusApplier,
) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context, done chan<- struct{})

type StatusApplier

type StatusApplier interface {
	ApplyStatus(ctx context.Context, status models.LoopStatus) (
		outcome string, err error)
}

Jump to

Keyboard shortcuts

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