A Go client library for the Hyperping API. This is the shared foundation that powers both the Terraform provider and the Prometheus exporter.
Built and maintained by Develeap. Source code on GitHub.
go get github.com/develeap/hyperping-gopackage main
import (
"context"
"fmt"
"log"
hyperping "github.com/develeap/hyperping-go"
)
func main() {
client := hyperping.NewClient("sk_...")
monitors, err := client.ListMonitors(context.Background())
if err != nil {
log.Fatal(err)
}
for _, m := range monitors {
fmt.Printf("%s: down=%v\n", m.Name, m.Down)
}
}Most users will interact with Hyperping through the Terraform provider or the Python SDK rather than using the Go client directly. The Go client is useful when you are: