uptime
This commit is contained in:
15
healthbeat/beat.go
Normal file
15
healthbeat/beat.go
Normal file
@ -0,0 +1,15 @@
|
||||
package healthbeat
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func Beat(url, status, msg string, ping int) {
|
||||
resp, err := http.Get(fmt.Sprintf("%s?status=%s&msg=%s&ping=%d", url, status, msg, ping))
|
||||
if err != nil {
|
||||
log.Printf("beat: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
}
|
Reference in New Issue
Block a user