# beyond_go-zero **Repository Path**: yh_zero/beyond_go-zero ## Basic Information - **Project Name**: beyond_go-zero - **Description**: go-zero实战项目 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-09-28 - **Last Updated**: 2024-01-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # beyond_go-zero #### 介绍 ## golang微服务实战项目 ### 使用了go-zero微服务框架 #### api接口端口定义为5001开始 #### rpc接口端口定义为7001开始 ### 利用nginx统一代理给前端使用 文件在:pkg/test/nginx_gateway.conf 查看etcd中是否已注册 etcdctl get --prefix user.rpc 查看租约 etcdctl lease list etcdctl lease timetolive 694d8a5192174527 #### windows cmd 运行需要\ 并且最外面也是“” grpcurl -plaintext -d "{\"bizId\": \"article\", \"objId\": 123, \"userId\": 234, \"likeType\": 1}" 127.0.0.1:6003 pb.Like.Thumbup pr 记录 不能重复关注、关注前需要判断两个用户是否存在 不能重复取消关注\没有关注到该用户 粉丝列表 ### 12课 启动rpc: user article 启动api: article 启动Consul: consul agent -dev 访问 http://127.0.0.1:8500 启动Prometheus: ./prometheus --config.file=prometheus.yml 访问 http://127.0.0.1:9090/ 启动Grafana: ./bin/grafana server 访问 http://127.0.0.1:3000 测压请求: ab -c 100 -n 2000 -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDE2ODUxMDIsImlhdCI6MTcwMTA4MDMwMiwidXNlcklkIjoyfQ.0NvD73RuKeD7vQVk_QIu2JIMqIIh4zL3c0wcai1msW0" "http://127.0.0.1:8001/v1/article/detail?article_id=1"