mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Added ping endpoint.
This commit is contained in:
@@ -88,6 +88,7 @@ func main() {
|
||||
s := r.Headers("Iron-Router", "").Subrouter()
|
||||
s.HandleFunc("/", AddWorker)
|
||||
r.HandleFunc("/addworker", AddWorker)
|
||||
r.HandleFunc("/ping", Ping) // for health
|
||||
|
||||
r.HandleFunc("/", ProxyFunc)
|
||||
|
||||
@@ -299,3 +300,7 @@ func putRoute(route *Route) (error) {
|
||||
err = icache.Put(route.Host, &item)
|
||||
return err
|
||||
}
|
||||
|
||||
func Ping(w http.ResponseWriter, req *http.Request) {
|
||||
fmt.Fprintln(w, "pong")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user