mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
12 lines
218 B
Go
12 lines
218 B
Go
package server
|
|
|
|
import "context"
|
|
|
|
type ServerOption func(*Server)
|
|
|
|
func EnableShutdownEndpoint(halt context.CancelFunc) ServerOption {
|
|
return func(s *Server) {
|
|
s.Router.GET("/shutdown", s.handleShutdown(halt))
|
|
}
|
|
}
|