proto

command module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 7 Imported by: 0

README

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

本仓库包含以下内容:

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

相关文档:

使用和开发

  1. 克隆该项目到本地:
git clone https://git.xswitch.cn/xswitch/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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
go
Package micro is a pluggable framework for microservices
Package micro is a pluggable framework for microservices
api
api/handler
Package handler provides http handlers
Package handler provides http handlers
api/handler/event
Package event provides a handler which publishes an event
Package event provides a handler which publishes an event
api/handler/web
Package web contains the web handler including websocket support
Package web contains the web handler including websocket support
api/resolver
Package resolver resolves a http request to an endpoint
Package resolver resolves a http request to an endpoint
api/resolver/grpc
Package grpc resolves a grpc service like /greeter.Say/Hello to greeter service
Package grpc resolves a grpc service like /greeter.Say/Hello to greeter service
api/resolver/host
Package host resolves using http host
Package host resolves using http host
api/resolver/path
Package path resolves using http path
Package path resolves using http path
api/resolver/vpath
Package vpath resolves using http path and recognised versioned urls
Package vpath resolves using http path and recognised versioned urls
api/router
Package router provides api service routing
Package router provides api service routing
api/router/registry
Package registry provides a dynamic api service router
Package registry provides a dynamic api service router
api/server
Package server provides an API gateway server which handles inbound requests
Package server provides an API gateway server which handles inbound requests
client
Package client is an interface for an RPC client
Package client is an interface for an RPC client
codec
Package codec is an interface for encoding messages
Package codec is an interface for encoding messages
codec/bytes
Package bytes provides a bytes codec which does not encode or decode anything
Package bytes provides a bytes codec which does not encode or decode anything
codec/grpc
Package grpc provides a grpc codec
Package grpc provides a grpc codec
codec/json
Package json provides a json codec
Package json provides a json codec
codec/jsonrpc
Package jsonrpc provides a json-rpc 1.0 codec
Package jsonrpc provides a json-rpc 1.0 codec
codec/proto
Package proto provides a proto codec
Package proto provides a proto codec
codec/protorpc
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
codec/text
Package text reads any text/* content-type
Package text reads any text/* content-type
debug/handler
Package handler implements service debug handler embedded in go-micro services
Package handler implements service debug handler embedded in go-micro services
debug/log
Package log provides debug logging
Package log provides debug logging
debug/log/memory
Package memory provides an in memory log buffer
Package memory provides an in memory log buffer
debug/profile
Package profile is for profilers
Package profile is for profilers
debug/profile/http
Package http enables the http profiler
Package http enables the http profiler
debug/profile/pprof
Package pprof provides a pprof profiler
Package pprof provides a pprof profiler
debug/stats
Package stats provides runtime stats
Package stats provides runtime stats
debug/trace
Package trace provides an interface for distributed tracing
Package trace provides an interface for distributed tracing
errors
Package errors provides a way to return detailed information for an RPC request error.
Package errors provides a way to return detailed information for an RPC request error.
logger
Package log provides a log interface
Package log provides a log interface
metadata
Package metadata is a way of defining message headers
Package metadata is a way of defining message headers
server
Package server is an interface for a micro server
Package server is an interface for a micro server
store
Package store is an interface for distribute data storage.
Package store is an interface for distribute data storage.
store/cache
Package cache implements a faulting style read cache on top of multiple micro stores
Package cache implements a faulting style read cache on top of multiple micro stores
store/file
Package local is a file system backed store
Package local is a file system backed store
store/memory
Package memory is a in-memory store store
Package memory is a in-memory store store
sync
Package sync is an interface for distributed synchronization
Package sync is an interface for distributed synchronization
sync/memory
Package memory provides a sync.Mutex implementation of the lock for local use
Package memory provides a sync.Mutex implementation of the lock for local use
util/backoff
Package backoff provides backoff functionality
Package backoff provides backoff functionality
util/log
Package log is a global internal logger
Package log is a global internal logger
util/qson
Package qson implmenets decoding of URL query params into JSON and Go values (using JSON struct tags).
Package qson implmenets decoding of URL query params into JSON and Go values (using JSON struct tags).
util/ring
Package ring provides a simple ring buffer for storing local data
Package ring provides a simple ring buffer for storing local data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL