结合net/http和fasthttp [英] Combining net/http and fasthttp

查看:57
本文介绍了结合net/http和fasthttp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找go的快速框架,却偶然发现了fasthttp https://github.com/valyala/据开发人员称,fasthttp 的基准速度比Golang net/http包快10倍.我已经熟悉大猩猩工具包和其他基于net/http的框架,例如gin-gonic,goji和gocraft.

I was looking for a fast framework for go and I stumbled upon fasthttp https://github.com/valyala/fasthttp which is according to the developer and the benchmark is 10x faster than Golang net/http package. I'm already familiar with gorilla toolkit and other net/http based frameworks like gin-gonic, goji, and gocraft.

我的问题是:是否可以将net/http框架/工具包与fasthttp混合使用?例如,我想将某些大猩猩包与echo/iris(fasthttp框架)一起使用?

推荐答案

我正在检查Iris框架,并且在文档中看到可以在该框架中使用net/http.

I was checking the Iris framework and I saw in the documentation that it's possible use net/http with the framework.

https://kataras.gitbooks.io/iris/content/using-native-httphandler.html

该框架使用以下内容将本机net/http处理程序转换为fasthttp处理程序.

The framework is using the following to convert native net/http handler to fasthttp handler.

https://github.com/valyala/fasthttp/tree/master/fasthttpadaptor

这篇关于结合net/http和fasthttp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆