server: stats endpoint (#468)

fixes #389
This commit is contained in:
C Cirello
2017-01-03 21:39:29 +01:00
committed by GitHub
parent 90092d2e8f
commit c48bd95fa6
6 changed files with 65 additions and 0 deletions

11
api/server/stats.go Normal file
View File

@@ -0,0 +1,11 @@
package server
import (
"net/http"
"github.com/gin-gonic/gin"
)
func (s *Server) handleStats(c *gin.Context) {
c.JSON(http.StatusOK, s.Runner.Stats())
}