A simple Go client for PagerDuty. This includes a retry feature when sending to PagerDuty
$ go get github.com/darkcrux/gopherduty
import "github.com/darkcrux/gopherduty"
client := gopherduty.NewClient("e93facc04764012d7bfb002500d5d1a6")
client.MaxRetry = 5 // set max retries to 5 before failing, Defaults to 0.
client.RetryBaseInterval = 5 // set first retry to 5s. Defaults to 10s.
response := client.Trigger("check-01", "something failed", "my-monitoring-client", "http://my.url.com", details)
response := client.Acknowledge("check1", "haxxor is fixing it naw", details)
response := client.Resolve("check1", "haxxor has fixed. Can haxxor has cheezburger", details)
response.HasErrors() // true if there were errors even after all the retries. :(
response.Status // the status code
response.Message // the return message
response.IncidentKey // the incident key of the request
response.Errors // list of errors
More info can be found here.