16 lines
273 B
Go
16 lines
273 B
Go
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()
|
|
}
|