mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
16 lines
244 B
Go
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")
|
|
}
|
|
}
|