mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
11
api/server/server_options.go
Normal file
11
api/server/server_options.go
Normal file
@@ -0,0 +1,11 @@
|
||||
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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user