3 Commits
Author SHA1 Message Date
sm efb2d846c3 Adds logging 2018-02-07 15:17:58 -08:00
sm 0964cece0c bump to v0.0.9
I forgot to run make before making the docker image.
2018-02-07 14:47:57 -08:00
sm fdba7a7ecd Adds liveness and readiness 2018-02-07 13:58:15 -08:00
+7 -1
View File
@@ -8,7 +8,7 @@ import (
"os" "os"
) )
const version = "v0.0.7" const version = "v0.0.10"
type v struct { type v struct {
Hostname string `json:"hostname"` Hostname string `json:"hostname"`
@@ -35,6 +35,12 @@ func main() {
fmt.Fprintf(w, "%v\n", line) fmt.Fprintf(w, "%v\n", line)
} }
}) })
http.HandleFunc("/live", func(w http.ResponseWriter, req *http.Request) {
log.Printf("live")
})
http.HandleFunc("/ready", func(w http.ResponseWriter, req *http.Request) {
log.Printf("ready")
})
if err := http.ListenAndServe(":8080", nil); err != nil { if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatalf("listen and serve: %v", err) log.Fatalf("listen and serve: %v", err)
} }