replace email processing reactions; update deps
This commit is contained in:
38
vendor/gitlab.com/etke.cc/go/healthchecks/v2/README.md
generated
vendored
38
vendor/gitlab.com/etke.cc/go/healthchecks/v2/README.md
generated
vendored
@@ -1,15 +1,37 @@
|
||||
# healthchecks
|
||||
|
||||
A [healthchecks.io](https://github.com/healthchecks/healthchecks) client
|
||||
A fully async [healthchecks.io](https://github.com/healthchecks/healthchecks) golang client, with lots of features, some highlights:
|
||||
|
||||
check the godoc for information
|
||||
* Highly configurable: `WithHTTPClient()`, `WithBaseURL()`, `WithUserAgent()`, `WithErrLog()`, `WithCheckUUID()`, `WithAutoProvision()`, etc.
|
||||
* Automatic determination of HTTP method (`POST`, `HEAD`) based on body existence
|
||||
* Auto mode: just call `client.Auto(time.Duration)` and client will send `Success()` request automatically with specified frequency
|
||||
* Global mode: init client once with `healthchecks.New()`, and access it from anywhere by calling `healthchecks.Global()`
|
||||
|
||||
Check [godoc](https://pkg.go.dev/gitlab.com/etke.cc/go/healthchecks/v2) for more details.
|
||||
|
||||
```go
|
||||
hc := healthchecks.New(
|
||||
healthchecks.WithCheckUUID("your-uuid"),
|
||||
)
|
||||
go hc.Auto()
|
||||
package main
|
||||
|
||||
hc.Log(strings.NewReader("optional body you can attach to any action"))
|
||||
hc.Shutdown()
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitlab.com/etke.cc/go/healthchecks/v2"
|
||||
)
|
||||
|
||||
var hc *healthchecks.Client
|
||||
|
||||
func main() {
|
||||
hc = healthchecks.New(
|
||||
healthchecks.WithCheckUUID("CHECK_UUID")
|
||||
)
|
||||
defer hc.Shutdown()
|
||||
// send basic success request
|
||||
hc.Success()
|
||||
|
||||
// or use auto mode, that will send success request with the specified frequency
|
||||
go hc.Auto(1*time.Minute)
|
||||
|
||||
// need to call the client from another place in your project?
|
||||
// just call healthchecks.Global() and you will get the same client
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user