github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/api/server/shutdown.go (about) 1 package server 2 3 import ( 4 "context" 5 "net/http" 6 7 "github.com/gin-gonic/gin" 8 ) 9 10 func (s *Server) handleShutdown(halt context.CancelFunc) func(*gin.Context) { 11 return func(c *gin.Context) { 12 halt() 13 c.JSON(http.StatusOK, "shutting down") 14 } 15 }