kitex: add page (#7782)

feature/windows-fix-syntax-2
baiyutang 2022-03-07 20:06:37 +08:00 committed by GitHub
parent fa9cbe265b
commit 5892e647de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 0 deletions

21
pages.zh/common/kitex.md Normal file
View File

@ -0,0 +1,21 @@
# kitex
> Kitex 是 Go RPC 框架 Kitex 框架提供的用于生成代码的一个命令行工具。
> 目前kitex 支持 thrift 和 protobuf 的 IDL并支持生成一个服务端项目的骨架。
> 更多信息:<https://www.cloudwego.io>.
- 生成客户端代码,项目在 `$GOPATH` 目录下:
`kitex {{路径/到/IDL文件.thrift}}`
- 生成客户端代码,项目不在 `$GOPATH` 目录下:
` kitex -module {{github.com/xx-org/xx-name}} {{路径/到/IDL文件.thrift}}`
- 根据 protobuf IDL 文件生成客户端代码:
`kitex -type protobuf {{路径/到/IDL文件.proto}}`
- 生成服务端代码:
`kitex -service {{svc_name}} {{路径/到/IDL文件.thrift}}`

21
pages/common/kitex.md Normal file
View File

@ -0,0 +1,21 @@
# kitex
> Code generation tool provided by the Go RPC framework Kitex.
> Kitex accepts both thrift and protobuf IDLs, and supports generating a skeleton of a server side project.
> More information: <https://www.cloudwego.io>.
- Generate client codes when a project is in `$GOPATH`:
`kitex {{path/to/IDL_file.thrift}}`
- Generate client codes when a project is not in `$GOPATH`:
` kitex -module {{github.com/xx-org/xx-name}} {{path/to/IDL_file.thrift}}`
- Generate client codes with protobuf IDL:
`kitex -type protobuf {{path/to/IDL_file.proto}}`
- Generate server codes:
`kitex -service {{svc_name}} {{path/to/IDL_file.thrift}}`