Skip to content

Commit

Permalink
feat: health check (Cloudbox#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-rots committed Apr 26, 2021
1 parent abe5d3a commit 89a4af1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/autoscan/health.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"net/http"
)

func healthHandler(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(http.StatusOK)
}
1 change: 1 addition & 0 deletions cmd/autoscan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func main() {

// http triggers
mux := http.NewServeMux()
mux.HandleFunc("/health", healthHandler)

manualTrigger, err := manual.New(c.Triggers.Manual)
if err != nil {
Expand Down

0 comments on commit 89a4af1

Please sign in to comment.