1package probing
2
3import (
4	"encoding/json"
5	"net/http"
6	"time"
7)
8
9func NewHandler() http.Handler {
10	return &httpHealth{}
11}
12
13type httpHealth struct {
14}
15
16type Health struct {
17	OK  bool
18	Now time.Time
19}
20
21func (h *httpHealth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
22	health := Health{OK: true, Now: time.Now()}
23	e := json.NewEncoder(w)
24	e.Encode(health)
25}
26