A simple Rust library that allows pinging healthchecks.io to indicate success or failure of a task.
Usage is super simple!
```rust use healthchecks::config::get_config;
fn main() { let config = getconfig("my-uuid-that-is-definitely-not-real"); config.reportfailure(); config.report_success(); } ```
Or if you want to set a custom user agent for filtering purposes (default is healthcheck-rs/$library_version
)
```rust use healthchecks::config::get_config;
fn main() { let config = getconfig("my-uuid-that-is-definitely-not-real").setuseragent("very-fancy-useragent"); config.reportfailure(); config.report_success(); }
```
You can also start a timer to record durations on healthchecks.io.
```rust use healthchecks::config::get_config;
fn main() { let config = getconfig("my-uuid-that-is-definitely-not-real"); config.starttimer(); dolongrunningtask(); config.reportsuccess(); }
```
Dual licensed under Apache 2.0 or MIT at your option.