openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Add /_/health endpoint to of-watchdog #13

Closed viveksyngh closed 5 years ago

viveksyngh commented 6 years ago

Introduce new endpoint /_/health to watchdog for health status of functions which checks for /tmp/.lock file

Added tests for healthHandler

Issues: https://github.com/openfaas/faas/issues/547

Signed-off-by: Vivek Singh vivekkmr45@yahoo.in

Description

Motivation and Context

How Has This Been Tested?

This has been tested on Mac by building the watchdog binary.

curl -i http://localhost:8081/_/health
HTTP/1.1 200 OK
Date: Tue, 03 Apr 2018 03:51:24 GMT
Content-Length: 2
Content-Type: text/plain; charset=utf-8

OK%

Types of changes

Checklist:

alexellis commented 6 years ago

I think this looks fine. @johnmccabe can you comment?

johnmccabe commented 6 years ago

Lgtm 👍