Simple http client api for healthchecks.io
go get -u github.com/frozzare/go-healthchecks
package main
import (
"context"
"log"
"github.com/frozzare/go-healthchecks"
)
func main() {
client := healthchecks.NewClient(nil)
err := client.Start(context.Background(), "your-uuid-here")
if err != nil {
log.Fatal(err)
}
err := client.Success(context.Background(), "your-uuid-here")
if err != nil {
log.Fatal(err)
}
err = client.Fail(context.Background(), "your-uuid-here")
if err != nil {
log.Fatal(err)
}
}
MIT © Fredrik Forsmo