Move to fasthttp for improved performance

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

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)
}