7

基于gRPC、API网关和身份验证的Go微服务源码项目

 2 years ago
source link: https://www.jdon.com/59945
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

基于gRPC、API网关和身份验证的Go微服务源码项目

这个案例是一个小型电子商务系统,开发了3个微服务和1个API网关,处理传入的HTTP请求。HTTP请求将通过gRPC转发给这些微服务。此外,我们还要处理JWT认证。
这个系统由四个微服务:
  1. API Gateway:处理传入的 HTTP 请求
  2. Auth Service:提供Register、Login等功能,通过JWT生成Token
  3. 产品服务:提供添加产品、减少库存和查找产品等功能
  4. 订单服务:我们在此微服务中提供的唯一功能是创建订单

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK