-
Notifications
You must be signed in to change notification settings - Fork 0
Lifecycle 包
omeyang edited this page Sep 17, 2026
·
1 revision
进程生命周期与健康探测。处理启动、关闭、健康检查的标准接口。
| 包 | 用途 | 稳定性 | 覆盖率 |
|---|---|---|---|
| xrun | 进程生命周期管理(errgroup + 信号处理) | Stable | 98.2% |
| xhealth | Kubernetes 健康探针(liveness/readiness/startup) | Stable | 92.4% |
| 场景 | 用 |
|---|---|
| 启动多个 goroutine 任务,统一管理生命周期 + 信号优雅退出 | xrun |
暴露 K8s /healthz、/readyz 端点 |
xhealth |
- Panic recover 纪律 - xhealth 的 statusListener 必须有 recover
- API 清单 Lifecycle 段