module
Version:
v0.1.4
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
¶
kitex-examples
Kitex echo 示例——client/server + Thrift IDL + 治理配置样例。
项目主页:https://oekit.github.io/ · 名称由来:Open Easy Kit(开源 · 易用 · 工具集合)
🤖 AI Agent:本仓规范与硬规则见 AGENTS.md;机器可读索引见 llms.txt(接口签名以源码为准)。
本仓库是 ekit 拆分矩阵的成员(Round-3 自 ekit-kitex 迁出),
使 ekit-kitex 主模块不再依赖 bootstrap 全链。
能做什么
- 真实 codegen:thrift IDL → kitex_gen,业务实现 EchoService 接口
- 双端齐备:server(Kitex Registry 注册)+ client(Discoverer 发现)
- 治理样例:configs/ 下 retry/rpc_timeout/limit JSON 样例
- 零 Nacos 也能跑:mock/静态实例配置
使用示例
运行
go run ./server # 先起 server
go run ./client # 再起 client
IDL 在 idl/echo.thrift,改完用 kitex 工具重新生成 kitex_gen。
结构
kitex_gen/ — thrift 生成的 echo 服务代码
client/、server/ — 示例客户端与服务端(接入 bootstrap + Nacos + 治理配置)
idl/echo.thrift — IDL
configs/ — retry/rpc_timeout/limit 治理配置样例
运行
go run ./server # 先起 server(注册到 Nacos / mock 模式)
go run ./client
依赖:ekit-kitex、ekit-bootstrap、ekit-registry、ekit-logx、ekit-tracing。
License
见 LICENSE
矩阵总览(23 活跃模块,自动生成)
依赖严格自底向上;微库已于 2026-10 合并为 pkg,旧微库仓已删除。
Directories
¶
|
|
|
kitex_gen
|
|
|
|
|
|
|
Code generated by Kitex v0.16.3. |
|
|
|
Click to show internal directories.
Click to hide internal directories.