Move to fasthttp for improved performance

This commit is contained in:
Morgan Bazalgette committed 2017-02-02 13:40:28 +01:00
1 parent ace2fded7e
commit 85e6dc7e5e
26 files changed
+448 -380

No files matched your search

+4 -10
View File
@@ -1,17 +1,11 @@
// Package internals has methods that suit none of the API packages.
package internals
import (
"github.com/gin-gonic/gin"
)
import "github.com/valyala/fasthttp"
type statusResponse struct {
Status int `json:"status"`
}
var statusResp = []byte(`{ "status": 1 }`)
// Status is used for checking the API is up by the ripple website, on the status page.
func Status(c *gin.Context) {
c.JSON(200, statusResponse{
Status: 1,
})
func Status(c *fasthttp.RequestCtx) {
c.Write(statusResp)
}