- 🔭 I’m currently working on game company.
- ⚡ Golang/Python/C/C++/C#.
- 📫 How to reach me: [email protected]
- 🍻 Guangzhou,China
trainking / goechoton Goto Github PK
View Code? Open in Web Editor NEW基于echo+arpc的Golang项目骨架
基于echo+arpc的Golang项目骨架
传入参数:
,
分割分布式锁应该保证以下:
*
代表所有地址可通过,空代表不许任何ip
通过RequestID需要实现以下功能:
需要生成的部分:
SingleFlight
控制缓存穿透makefile需要管理以下操作:
gen
假设api存在v1和v2两套路由,则存在下列情况:
两套路由兼容
两套路由不兼容
互相之间不做升降级操作
错误码设计需求:
GoEchoton/pkg/apiserver/context.go
Line 61 in d3d307c
在中间件解析好,透传之后,提供方法进行修改
此处Data字段已经json.Unmarsh成interface{},是否有更优转换对象方法?
GoEchoton/pkg/arpcx/context.go
Line 56 in ad96d38
rpc的服务端和客户端实现,还是内聚紧密实现比较好
Echo中,使用middleware
作为全局中间件时,需要注意,echo.Request().Body
是一个io.ReadCloser
。
读出数据之后,要重新建立一个io.ReadCloser
放回去,不然会导致下一个处理中,读取不到数据,报EOF
错误。
bodyContens, err := ioutil.ReadAll(req.Body)
...
req.Body = ioutil.NopCloser(bytes.NewReader(bodyContens))
该模块具有以下功能:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.