replace email processing reactions; update deps

This commit is contained in:
Aine
2024-04-30 09:18:04 +03:00
parent 15d61f174e
commit 0e3655195a
35 changed files with 709 additions and 247 deletions

View File

@@ -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
}
```