2个版本
0.2.0 | 2022年2月11日 |
---|
37 in #health-check
14KB
266 代码行
hcp
(缩写为健康检查ping) 是一个简单的实用工具,它封装了终端命令,向healthchecks.io发送开始和结束通知。如果命令以非零返回退出,它将报告失败。它还会将命令的stdout和stderr输出包含到healthchecks
hcp [--hcp-id HCP_ID] [--hcp-tee] [--hcp-ignore-code] [cmd [args...]]
HCP_ID can be set using an environment variable
--hcp-id HCP_ID Sets the healthchecks id. This can also be set using the
environment variable HCP_ID
--hcp-ignore-code Ignore the return code from cmd. Also available using HCP_IGNORE_CODE
--hcp-tee Controls whether to also output the cmd stdout/stderr to the local
stdout/stderr. By default the output from the cmd will only get
passed as text to healthchecks. This option can also be enabled
using the environment variable HCP_TEE. Only the existance of the
variable is checked
[cmd [args...]] If no command is passed, the healthcheck will be notified as a
success with the text 'No command given'
构建说明
此实用工具是用Rust编写的。使用正常的构建过程
cargo build --release
依赖关系
~2.5MB
~70K SLoC