Documentation ¶ Index ¶ Constants type Option func SetGracefulShutdownDuration(d time.Duration) Option type Server func NewServer(addr string, handler http.Handler, opts ...Option) *Server func (s *Server) Shutdown() func (s *Server) Start() Constants ¶ View Source const ( DefaultGracefulShutdownDuration = 5 * time.Second ) Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Option ¶ type Option func(*options) func SetGracefulShutdownDuration ¶ func SetGracefulShutdownDuration(d time.Duration) Option type Server ¶ type Server struct { // contains filtered or unexported fields } func NewServer ¶ func NewServer(addr string, handler http.Handler, opts ...Option) *Server func (*Server) Shutdown ¶ func (s *Server) Shutdown() func (*Server) Start ¶ func (s *Server) Start() Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.