health

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEALTH_REQ   = "GET /health HTTP"
	OK_RESPONSE  = "HTTP/1.1 200 OK\r\n"
	BAD_RESPONSE = "HTTP/1.1 400 Bad Request\r\n"
)

Variables

This section is empty.

Functions

func HandleHealthCheck

func HandleHealthCheck(conn net.Conn, buf []byte) error

Given a connectioned client conn and its message as a byte-slice buf, validate it's an HTTP request. If so, write a "204 No Content" http response letting the caller know bolt-proxy is alive.

func IsHealthCheck

func IsHealthCheck(buf []byte) bool

Check if the given buf looks like an HTTP GET to our /health endpoint

Types

This section is empty.

Jump to

Keyboard shortcuts

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