module
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Oct 15, 2026
License: MIT
Opens a new window with license information.
README
¶
bootstrap
应用生命周期引导——统一装配注册发现、NNS、可观测性与优雅关停。
项目主页:https://oekit.github.io/ · 名称由来:Open Easy Kit(开源 · 易用 · 工具集合)
🤖 AI Agent:本仓规范与硬规则见 AGENTS.md;机器可读索引见 llms.txt(接口签名以源码为准)。
本仓库是 ekit(git.enjoye.top/enjoydream/ekit v0.34.0)
拆分出的独立 Go module,属于 oekit(Open Easy Kit)模块矩阵。
安装
go get github.com/oekit/bootstrap@v0.2.4
快速使用
import "github.com/oekit/bootstrap/bootstrap"
bootstrap.Run(cfg, func(app *bootstrap.App) error {
// 装配组件……app.AddResource / app.GoBackground
<-app.Context().Done() // ★ 长驻服务必须阻塞
return nil
})
包清单
- `bootstrap/` — bootstrap.Run 应用骨架、App(ctx + 资源注册)
- `bootstrap/healthz/` — 健康检查 registry + handler(K8s liveness/readiness)
矩阵总览(23 活跃模块,自动生成)
依赖严格自底向上;微库已于 2026-10 合并为 pkg,旧微库仓已删除。
当前仓库依赖
详见上方矩阵表中本仓库行。
与 ekit 单体仓库的关系
- 代码与 ekit v0.34.0 等价,module 路径
git.enjoye.top/enjoydream/ekit/... → github.com/oekit/bootstrap/...
- 各子仓库独立发版(SemVer);开发规范沿用 ekit AGENTS.md 约定
License
见 LICENSE
Directories
¶
Package bootstrap 定义组件化启动编排。
|
Package bootstrap 定义组件化启动编排。 |
healthz
Package healthz 提供 ekit 应用健康检查 helper,让业务注册多个 check 项(DB / Redis / 上游依赖等),/healthz endpoint 一次调起,全部通过返 200, 任一失败返 503。
|
Package healthz 提供 ekit 应用健康检查 helper,让业务注册多个 check 项(DB / Redis / 上游依赖等),/healthz endpoint 一次调起,全部通过返 200, 任一失败返 503。 |
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.