mirror of https://github.com/CrimsonTome/tldr.git
kitex: add page (#7782)
parent
fa9cbe265b
commit
5892e647de
|
@ -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}}`
|
|
@ -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}}`
|
Loading…
Reference in New Issue