Files
tldr/pages.zh/common/kitex.md

21 lines
617 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# kitex
> 由 Go RPC 框架 Kitex 提供的代码生成工具。
> Kitex 支持 thrift 和 protobuf IDL并支持生成服务器端项目的骨架。
> 更多信息:<https://www.cloudwego.io>。
- 当项目位于 `$GOPATH` 中时生成客户端代码:
`kitex {{path/to/IDL_file.thrift}}`
- 当项目不在 `$GOPATH` 中时生成客户端代码:
`kitex -module {{github.com/xx-org/xx-name}} {{path/to/IDL_file.thrift}}`
- 使用 protobuf IDL 生成客户端代码:
`kitex -type protobuf {{path/to/IDL_file.proto}}`
- 生成服务器代码:
`kitex -service {{svc_name}} {{path/to/IDL_file.thrift}}`