rpc

module
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT

README

rpc

workflows Release Go Report Card

Go 微服务框架,同时支持 gRPC 和 HTTP,封装各种常用组件,开箱即用,专注业务


建议反馈

如果您对本框架有任何意见或建议,欢迎随时通过以下方式反馈和完善:

  1. 提 issues 反馈
  2. 通过下方的联系方式直接联系我
  3. 提 PR 共同维护

联系我

QQ群:909211071
个人QQ:444216978
微信:AirGo___

功能列表

✅  多格式配置读取
✅  服务优雅关闭
✅  进程结束资源自动回收
✅  日志抽象和标准字段统一(请求、DB、Redis、RPC)
✅  DB(ORM)
✅  Redis
✅  RabbitMQ
✅  Kafka
✅  Apollo配置中心
✅  cron定时任务
✅  单机和分布式限流
✅  分布式缓存(解决缓存穿透、击穿、雪崩)
✅  分布式链路追踪
✅  分布式锁
✅  服务注册
✅  服务发现
✅  负载均衡
✅  通用链接池
✅  HTTP-RPC 超时传递
✅  端口多路复用
✅  gRPC
✅  Prometheus 监控

后续规划

日志收集
告警
限流
熔断

工程目录

- rpc
  - bootstrap //应用启动
  - client
    - grpc //grpc客户端
    - http //http客户端
  - library //基础组件库,不建议修改
    - app //app
    - apollo //阿波罗
    - cache //分布式缓存
    - config //配置加载
    - cron //任务调度
    - etcd //etcd
    - grpc //grpc封装
    - opentracing //opentracing分布式链路追踪
    - limiter //限流
    - lock //分布式锁
    - logger //日志
    - orm //db orm
    - otel //otel分布式链路追踪
    - pool //通用链接池
    - prometheus //prometheus监控
    - queue //消息队列
    - redis //redis
    - registry //注册中心
    - reliablequeue //可靠消息队列
    - selector //负载均衡器
    - servicer //下游服务
  - mock
    - third //三方单测mock
    - tools //常见mock工具封装
  - server
    - grpc //grpc服务端
    - http //http服务端  
  - third //三方依赖引入
  .gitignore
  Dockerfile
  LICENSE
  Makefile
  README.md
  go.mod
  go.sum

Example

HTTP
gRPC
完整业务架构


Star History Chart

Directories

Path Synopsis
client
library
apollo/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
app
cache/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
limiter/alone/leakybucket
Reference uber ratelimit, the different is support no wait take func
Reference uber ratelimit, the different is support no wait take func
limiter/alone/slidingwindow
Package slidingwindow is a generated GoMock package.
Package slidingwindow is a generated GoMock package.
limiter/distributed/leakybucket
Package leakybucket is a generated GoMock package.
Package leakybucket is a generated GoMock package.
limiter/distributed/slidinglog
Package slidinglog is a generated GoMock package.
Package slidinglog is a generated GoMock package.
lock/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
orm
otel/exporters/prometheus
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus
otel/exporters/zipkin
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/zipkin
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/zipkin
selector/dwrr
dwrr is Dynamic Weighted Round Robin
dwrr is Dynamic Weighted Round Robin
selector/icmp
icmp is load balance by ping rtt
icmp is load balance by ping rtt
selector/p2c
p2c is reference https://exceting.github.io/2020/08/13/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-P2C%E7%AE%97%E6%B3%95/
p2c is reference https://exceting.github.io/2020/08/13/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-P2C%E7%AE%97%E6%B3%95/
selector/wr
wr is Weighted random
wr is Weighted random
selector/wrr
wrr is Weighted Round Robin reference Nginx https://blog.csdn.net/zhangskd/article/details/50194069
wrr is Weighted Round Robin reference Nginx https://blog.csdn.net/zhangskd/article/details/50194069
servicer/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
generate/redis
Package redis is a generated GoMock package.
Package redis is a generated GoMock package.

Jump to

Keyboard shortcuts

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