Documentation ¶
Overview ¶
Go client library for accessing the Healthchecks API.
Get started:
func main() { var err error client := gohealthchecks.NewClient(nil) err = client.Start(context.Background(), gohealthchecks.PingingOptions{ UUID: "5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278", Logs: "Job started!", }) if err != nil { log.Fatal(err) } err = client.Success(context.Background(), gohealthchecks.PingingOptions{ UUID: "5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278", Logs: "Job completed!", }) if err != nil { log.Fatal(err) } err = client.Fail(context.Background(), gohealthchecks.PingingOptions{ UUID: "5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278", Logs: "Job failed...", }) if err != nil { log.Fatal(err) } }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with the Healthchecks API.
func (*Client) Fail ¶
func (c *Client) Fail(ctx context.Context, po PingingOptions) (err error)
Fail sends a fail request to Healthchecks to indicate that an error has occurred.
type ClientOptions ¶
ClientOptions holds optional parameters for the Client.
type PingingOptions ¶
PingingOptions holds parameters for the Pinging API.
Click to show internal directories.
Click to hide internal directories.