<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [功能点对应源码](#%E5%8A%9F%E8%83%BD%E7%82%B9%E5%AF%B9%E5%BA%94%E6%BA%90%E7%A0%81)
- [Go 微服务网关代码使用说明](#go-%E5%BE%AE%E6%9C%8D%E5%8A%A1%E7%BD%91%E5%85%B3%E4%BB%A3%E7%A0%81%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E)
- [代码帮助](#%E4%BB%A3%E7%A0%81%E5%B8%AE%E5%8A%A9)
- [运行后端代码](#%E8%BF%90%E8%A1%8C%E5%90%8E%E7%AB%AF%E4%BB%A3%E7%A0%81)
- [运行后端项目](#%E8%BF%90%E8%A1%8C%E5%90%8E%E7%AB%AF%E9%A1%B9%E7%9B%AE)
- [运行前端项目](#%E8%BF%90%E8%A1%8C%E5%89%8D%E7%AB%AF%E9%A1%B9%E7%9B%AE)
- [后端goland编辑器参考](#%E5%90%8E%E7%AB%AFgoland%E7%BC%96%E8%BE%91%E5%99%A8%E5%8F%82%E8%80%83)
- [vscode编辑器设置参考](#vscode%E7%BC%96%E8%BE%91%E5%99%A8%E8%AE%BE%E7%BD%AE%E5%8F%82%E8%80%83)
- [代码部署](#%E4%BB%A3%E7%A0%81%E9%83%A8%E7%BD%B2)
- [实体机部署](#%E5%AE%9E%E4%BD%93%E6%9C%BA%E9%83%A8%E7%BD%B2)
- [1、每个项目独立部署](#1%E6%AF%8F%E4%B8%AA%E9%A1%B9%E7%9B%AE%E7%8B%AC%E7%AB%8B%E9%83%A8%E7%BD%B2)
- [2、前后端合并部署](#2%E5%89%8D%E5%90%8E%E7%AB%AF%E5%90%88%E5%B9%B6%E9%83%A8%E7%BD%B2)
- [k8s部署](#k8s%E9%83%A8%E7%BD%B2)
- [后端环境搭建及编辑器使用 参考文档](#%E5%90%8E%E7%AB%AF%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E5%8F%8A%E7%BC%96%E8%BE%91%E5%99%A8%E4%BD%BF%E7%94%A8-%E5%8F%82%E8%80%83%E6%96%87%E6%A1%A3)
- [前端环境搭建及编辑器使用参考文档](#%E5%89%8D%E7%AB%AF%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E5%8F%8A%E7%BC%96%E8%BE%91%E5%99%A8%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83%E6%96%87%E6%A1%A3)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# 功能点对应源码
功能点| 源码地址
---|---
熔断器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/circuit_breaker)
单机流量统计| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/flow_count)
分布式流量统计| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/redis_flow_count)
grpc反向代理| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/grpc_reverse_proxy)
grpc反向代理整合中间件| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/grpc_reverse_proxy_advance)
grpc反向代理整合负载均衡器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/grpc_reverse_proxy_lb)
grpc测试服务器、客户端、grpc-gateway| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/grpc_server_client)
负载均衡器支持四种负载策略 | [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/load_balance)
负载均衡之主动探测 | [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/load_balance_client_discovery)
负载均衡之服务发现 | [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/load_balance_server_discovery)
中间件实现| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/middleware)
观察者模式| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/observer)
限流器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/rate_limiter)
测试下游服务器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/real_server)
测试下游服务器+服务注册| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/real_server_register)
浏览器正向代理| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/forward_proxy)
http反向代理实现| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/reverse_proxy)
http反向代理简单版| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/reverse_proxy_simple)
http2反向代理| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/reverse_proxy_http2)
https反向代理| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/reverse_proxy_https)
http反向代理基本功能| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/reverse_proxy_base)
http反向代理权限校验| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/security_check)
tcp代理服务器实现| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/tcp_proxy)
thrift服务器与客户端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/thrift_server_client)
websocket代理服务器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/websocket)
zookeeper基本使用| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/proxy/zookeeper)
==基础功能==| ===基础功能===
函数是一等公民| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/functional)
http客户端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/http_client)
http服务端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/http_server)
tcp客户端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/tcp_client)
tcp代理| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/tcp_proxy)
tcp服务器| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/tcp_server)
udp客户端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/udp_client)
udp服务端| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/udp_server)
tcp自定义协议获取完整报文| [源代码](https://github.com/e421083458/gateway_demo/tree/master/demo/base/unpack)
其他正在补充... | 其他正在补充...
# Go 微服务网关代码使用说明
这是慕课网上的实战课程[《Go 微服务网关》](https://coding.imooc.com/class/436.html)的代码仓。这个代码仓将不仅仅包含课程的所有源代码,还将发布课程的更新相关内容,勘误信息以及计划的更多可以丰富课程的内容,如更多分享,多多练习,等等等等。
大家可以下载、运行、测试、修改。如果你发现了任何bug,或者对课程中的任何内容有意见或建议,欢迎和我联系:)
第1-8章节功能演示代码:https://github.com/e421083458/gateway_demo
完整后端项目:https://github.com/e421083458/go_gateway
完整前端项目:https://github.com/e421083458/go_gateway_view
思维导图:[点击查看](http://naotu.baidu.com/file/0abcf68f3bd03964a63c8c35b44d681d?token=864a35c5e3647e34)
项目的预览地址:http://gateway.itpp.cn:9527/
电子邮箱:[email protected](招php、golang中简历砸过来)
微信公众号:
![image](http://chuantu.xyz/t6/731/1587960911x3030586988.jpg)
## 代码帮助
### 运行后端代码
- 首先git clone 本项目
`git clone [email protected]:e421083458/gateway_demo.git`
- 确保本地环境安装了Go 1.12+版本
```
go version
go version go1.12.15 darwin/amd64
```
- 下载类库依赖
```
export GO111MODULE=on && export GOPROXY=https://goproxy.cn
cd gateway_demo
go mod tidy
```
- 在相应功能文件夹下,执行 `go run main.go` 即可。
### 运行后端项目
- 首先git clone 本项目
`git clone [email protected]:e421083458/go_gateway.git`
- 确保本地环境安装了Go 1.12+版本
```
go version
go version go1.12.15 darwin/amd64
```
- 下载类库依赖
```
export GO111MODULE=on && export GOPROXY=https://goproxy.cn
cd go_gateway
go mod tidy
```
- 创建 db 并导入数据
```
mysql -h localhost -u root
没有合适的资源?快使用搜索试试~ 我知道了~
微服务网关后端配套代码-go_gateway.zip
共170个文件
go:100个
js:18个
css:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 144 浏览量
2024-01-30
21:27:14
上传
评论
收藏 1.09MB ZIP 举报
温馨提示
微服务网关后端配套代码-go_gateway
资源推荐
资源详情
资源评论
收起资源包目录
微服务网关后端配套代码-go_gateway.zip (170个子文件)
ca.crt 1KB
client.crt 985B
server.crt 985B
client.csr 895B
server.csr 895B
app.c068a7d0.css 245KB
chunk-556562e8.b043920c.css 5KB
chunk-libs.3dfb7769.css 3KB
chunk-0c8f083f.42401dac.css 2KB
chunk-830154a6.93d95231.css 2KB
chunk-01bafe94.6d24dacd.css 763B
chunk-5838f4ce.6d24dacd.css 763B
chunk-05a99c67.d0296c60.css 745B
chunk-569050ae.b1d9f1ec.css 296B
chunk-332e9546.d3b4ac8e.css 296B
chunk-41ee40c0.b0fc6a10.css 296B
chunk-3c81f54c.a8e85e23.css 163B
chunk-682aca40.2e87cc20.css 89B
chunk-26ce89a6.c5f2d082.css 89B
dockerfile-dashboard 263B
dockerfile-server 255B
401.089007e7.gif 160KB
.gitignore 24B
docs.go 69KB
service.go 24KB
service.go 17KB
func.go 10KB
app.go 7KB
conf.go 7KB
mysql.go 6KB
service_load_balance.go 6KB
translation.go 6KB
log.go 5KB
route.go 4KB
file_writer.go 4KB
dashboard.go 4KB
app.go 4KB
service_info.go 4KB
admin.go 3KB
service.go 3KB
app.go 3KB
log.go 3KB
redis.go 3KB
tcp_server.go 3KB
tcp_reverse_proxy.go 3KB
oauth.go 3KB
consistent_hash.go 3KB
tcp_slice_router.go 3KB
httpserver.go 3KB
redis_flow_count.go 3KB
http_reverse_proxy.go 2KB
admin_login.go 2KB
check_config.go 2KB
service_http_rule.go 2KB
weight_round_robin.go 2KB
grpcserver.go 2KB
tcpserver.go 2KB
service_access_control.go 2KB
log.go 2KB
grpc_flow_limit.go 2KB
admin.go 2KB
config.go 2KB
response.go 2KB
grpc_jwt_flow_limit.go 2KB
http_flow_limit.go 2KB
request_log.go 2KB
tcp_flow_limit.go 2KB
main.go 2KB
service_grpc_rule.go 1KB
file.go 1KB
grpc_black_list.go 1KB
console_writer.go 1KB
grpc_jwt_auth_token.go 1KB
grpc_jwt_flow_count.go 1KB
http_jwt_auth_token.go 1KB
service_tcp_rule.go 1KB
params.go 1KB
http_flow_count.go 1KB
route.go 1KB
grpc_white_list.go 1KB
round_robin.go 1KB
tcp_black_list.go 1KB
http_black_list.go 1KB
httpserver.go 1KB
factory.go 1KB
grpc_header_transfer.go 1KB
tcp_conn.go 1KB
http_reverse_proxy.go 1KB
random.go 1KB
flow_limit_handler.go 1KB
http_url_rewrite.go 1KB
tcp_white_list.go 1000B
flow_count_handler.go 995B
http_white_list.go 990B
http_strip_uri.go 982B
grpc_flow_count.go 919B
tcp_flow_count.go 901B
http_jwt_flow_limit.go 879B
http_jwt_flow_count.go 876B
grcp_reverse_proxy.go 853B
共 170 条
- 1
- 2
资源评论
武昌库里写JAVA
- 粉丝: 3401
- 资源: 1986
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功