github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/api/server/server_options.go (about) 1 package server 2 3 import "context" 4 5 type ServerOption func(*Server) 6 7 func EnableShutdownEndpoint(halt context.CancelFunc) ServerOption { 8 return func(s *Server) { 9 s.Router.GET("/shutdown", s.handleShutdown(halt)) 10 } 11 }