init commit
This commit is contained in:
1 parent
eda2b643b9
commit
3efed3defe
5834 files changed
+636508
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"air/entity"
|
||||
"flswld.com/logger"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// HTTP心跳
|
||||
func (c *Controller) httpKeepalive(context *gin.Context) {
|
||||
inst := new(entity.Instance)
|
||||
err := context.ShouldBindJSON(inst)
|
||||
if err != nil {
|
||||
logger.LOG.Error("parse json error: %v", err)
|
||||
return
|
||||
}
|
||||
c.service.HttpKeepalive(*inst)
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
})
|
||||
}
|
||||
|
||||
// RPC心跳
|
||||
func (c *Controller) rpcKeepalive(context *gin.Context) {
|
||||
inst := new(entity.Instance)
|
||||
err := context.ShouldBindJSON(inst)
|
||||
if err != nil {
|
||||
logger.LOG.Error("parse json error: %v", err)
|
||||
return
|
||||
}
|
||||
c.service.RpcKeepalive(*inst)
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user