health

package
v2.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnhealthy = errors.New("program is unhealthy")

Functions

func IsClientMode

func IsClientMode(args []string) bool

func IsHealthy

func IsHealthy() (err error)

IsHealthy checks the localhost DNS UDP server is working by resolving github.com.

func NewServer

func NewServer(address string, logger Infoer, healthcheck func() error) (
	server *httpserver.Server, err error)

Types

type Client

type Client struct {
	*http.Client
}

func NewClient

func NewClient() *Client

func (*Client) Query

func (c *Client) Query(ctx context.Context) error

Query sends an HTTP request to the other instance of the program, and to its internal healthcheck server.

type Infoer

type Infoer interface {
	Info(s string)
}

Jump to

Keyboard shortcuts

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