Skip to content

Latest commit

 

History

127 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpc

workflows Release Go Report Card License: MIT

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


建议反馈

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

  1. 提 issues 反馈
  2. 提 PR 共同维护

功能列表

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

后续规划

日志收集
告警
限流
熔断

工程目录

- rpc
  - bootstrap //应用启动
  - client
    - grpc //grpc客户端
    - http //http客户端
  - library //基础组件库,不建议修改
    - addr //地址解析
    - apollo //阿波罗配置中心
    - app //app
    - bloom //布隆过滤器(本地、redis)
    - broker //组件间事件通知
    - cache //分布式缓存
    - config //配置加载
    - conn //连接封装
    - connector //连接器
    - connpool //连接池抽象
    - context //上下文
    - cron //任务调度
    - discoverer //服务发现(dns、etcd)
    - etcd //etcd
    - limiter //限流(单机、分布式)
    - loadbalancer //负载均衡(dwrr、icmp、p2c、roundrobin、wr、wrr)
    - lock //分布式锁
    - logger //日志
    - opentracing //opentracing分布式链路追踪
    - orm //db orm
    - otel //otel分布式链路追踪
    - pool //通用链接池
    - prometheus //prometheus监控
    - queue //消息队列(kafka、rabbitmq)
    - redis //redis
    - registrar //服务注册
    - reliablequeue //可靠消息队列
    - servicer //下游服务
  - llm
    - mcp //mcp客户端和服务端封装
  - mock
    - generate //三方单测mock
    - tools //常见mock工具封装
  - server
    - grpc //grpc服务端
    - http //http服务端
  .gitignore
  LICENSE
  Makefile
  README.md
  go.mod
  go.sum

Example

HTTP
gRPC
完整业务架构


Star History Chart

About

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

Topics

Resources

Stars

133 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages