add simple health endpoint
This commit is contained in:
parent
d87c5f6000
commit
6048b75b4c
1 changed files with 3 additions and 0 deletions
3
main.go
3
main.go
|
@ -219,6 +219,9 @@ func main() {
|
|||
flag.Parse()
|
||||
|
||||
http.Handle("/metrics", handler{sourceURL: *videoBridgeURL})
|
||||
http.HandleFunc("/health", func(w http.ResponseWriter, req *http.Request) {
|
||||
_, _ = w.Write([]byte(`ok`))
|
||||
})
|
||||
if err := http.ListenAndServe(*addr, nil); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue