Files
fn-serverless/api/server/shutdown.go
2016-12-29 20:19:42 +01:00

16 lines
244 B
Go

package server
import (
"context"
"net/http"
"github.com/gin-gonic/gin"
)
func (s *Server) handleShutdown(halt context.CancelFunc) func(*gin.Context) {
return func(c *gin.Context) {
halt()
c.JSON(http.StatusOK, "shutting down")
}
}