<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>快速开始 :: Zeus</title><link>https://docs.cncf.vip/go-zeus/getting-started/index.html</link><description/><generator>Hugo</generator><language>zh</language><atom:link href="https://docs.cncf.vip/go-zeus/getting-started/index.xml" rel="self" type="application/rss+xml"/><item><title>安装</title><link>https://docs.cncf.vip/go-zeus/getting-started/installation/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.cncf.vip/go-zeus/getting-started/installation/index.html</guid><description>环境要求 Go 1.22+（主仓要求，log/slog 等标准库 API 决定） 可选：Go 1.25+（如需使用 etcd/otel 等插件） 主仓安装 1go get github.com/go-zeus/zeus 主仓零第三方依赖，所有第三方实现都在 plugins/ 下作为独立 module 维护。
插件安装 按需引入，互不影响：
1go get github.com/go-zeus/zeus/plugins/registry/etcd 2 3go get github.com/go-zeus/zeus/plugins/cache/redis 4 5go get github.com/go-zeus/zeus/plugins/mq/kafka 6 7go get github.com/go-zeus/zeus/plugins/metrics/prometheus 完整插件清单参见 插件 BOM。</description></item><item><title>快速开始</title><link>https://docs.cncf.vip/go-zeus/getting-started/quickstart/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.cncf.vip/go-zeus/getting-started/quickstart/index.html</guid><description>最小可运行示例 1package main 2 3import ( 4 "net/http" 5 6 "github.com/go-zeus/zeus/app" 7) 8 9func main() { 10 app.Run(&amp;app.Config{Port: 8080}, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 11 w.Write([]byte("hello from zeus")) 12 })) 13} 14 15// curl http://localhost:8080 默认装配（零配置自动启用） 未配置时自动启用，用户零感知：
默认项 内置实现 Server 协议 按 handler 类型推断（http.Handler → HTTP） 注册中心 registry/memory（L1） 日志 log/slog 输出到 stdout 中间件 recovery + requestID + 请求日志 健康检查 /health /health/ready /health/live Metrics 非默认装配：L1 app.Run 不注入 meter、不注册 /metrics；需经 L3 WithMeter + metrics 中间件显式启用 信号处理 SIGTERM/SIGINT/SIGQUIT → 优雅关闭（10s 超时） 服务名 zeus-service（可覆盖） 关键规则：默认装配不允许失败。任何"必须配置才能跑"的字段都是设计缺陷。</description></item><item><title>4 层 API</title><link>https://docs.cncf.vip/go-zeus/getting-started/layered-api/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.cncf.vip/go-zeus/getting-started/layered-api/index.html</guid><description>Zeus 用 4 层 API 覆盖不同用户。不允许越层泄漏概念——L1 用户不应感知 Component / Container / Lifecycle 等内部接口名。
层级概览 层 用户 入口 暴露概念 目标 L1 学习者 / 单进程 demo zeus.Run(cfg, handler) 仅 App + Config 5 行启动 L2 个人开发者 / 配置驱动 zeus.Run(cfgWithRegistry, handler) App + Config + Registry（URL） 改配置即可 L3 小团队 / 代码定制 app.NewApp(opts ...AppOption) Server + Logger + Registry + … 类型装配 L4 定制需求 / 完全控制 components.NewApp(comps ...any) 全部组件接口 永久逃生通道 L1：5 行启动 1app.Run(&amp;app.Config{Port: 8080}, http.HandlerFunc(handler)) 仅暴露 App 和 Config 两个概念。其余全部默认装配。</description></item></channel></rss>