Skip to content

Latest commit

 

History

143 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proto - XSwitch XCC API Protocol Buffer 文件及各语言SDK

本仓库包含以下内容:

  • proto:Protocol Buffer描述文件。
  • go:Go语言SDK,配合xctrl使用。
  • java:Java语言SDK。
  • docs:文档。
  • xctrl:Go Protobuf代码生成器和插件。

相关文档:

使用和开发

修改proto

  1. 修改proto下的xctrl.proto或者cman.proto
  2. 如果需要实现ChannelEvent则需要在xctrl.go下的channelMethodTimeout的Map中添加Key和Value, Key是Rpc方法名,Value是延迟秒数

开发教程

  1. 克隆该项目到本地:
git clone https://github.com/xswitch-cn/xctrl.git
cd xctrl
  1. Protocol Buffers编译器(protoc)
brew install protobuf
  1. 安装protoc-gen-doc依赖:
  • 推荐方式:
make setup  
  • 手动安装:
go install github.com/chuanlinzhang/protoc-gen-doc/cmd/protoc-gen-doc@v0.0.2
  1. 根据需要生成相应语言的代码:
  • 生成Go代码
make proto
  • 生成Java代码
make java

注意:Java代码仅为示例参考,.proto在后续更新时不会同步更新。如果使用Java的请自行执行make proto生成最新代码。

  • 生成Markdown文档
make doc-md
  • 生成HTML文档
make doc-html

测试

go run main.go
make test

About

XCC Protobuffer definitions

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages