release revsuit vBeta0.1.0 (#15)

Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
Li4n0
2021-05-16 12:11:35 +08:00
committed by GitHub
co-authored by E99p1ant
parent b39ee101f9
commit 5b63e90390
98 changed files with 2357 additions and 623 deletions
+10 -3
View File
@@ -27,9 +27,8 @@ func ping(c *gin.Context) {
}
func events(c *gin.Context) {
log.Info("Receive connection from %v", c.Request.RemoteAddr)
log.Info("Receive client connection from %v", c.Request.RemoteAddr)
c.Stream(func(w io.Writer) bool {
c.SSEvent("message", "connect succeed")
select {
case <-c.Writer.CloseNotify():
return false
@@ -38,7 +37,7 @@ func events(c *gin.Context) {
}
return true
})
log.Info(c.Request.RemoteAddr, "disconnect")
log.Info("Client %s disconnect", c.Request.RemoteAddr)
}
func recovery(c *gin.Context) {
@@ -85,3 +84,11 @@ func recovery(c *gin.Context) {
}()
c.Next()
}
func version(c *gin.Context) {
c.JSON(200, gin.H{
"status": "succeed",
"error": nil,
"result": VERSION,
})
}