Discover Packages
github.com/yushihui/gotraining
topics
web
shutdown
directory
Version:
v0.0.0-...-86d22a7
Opens a new window with list of versions in this module.
Published: Jul 17, 2017
License: Apache-2.0
Opens a new window with license information.
README
README
¶
Web - Shutdown
Learn how to gracefully shut a server down.
Notes
Since 1.8 the Server
from net/http
package has built in support for graceful shutdown. Prior to 1.8 use github.com/braintree/manners
.
Links
https://golang.org/pkg/net/http/
https://github.com/rakyll/hey
Code Review
Graceful Shutdown
Exercises
Exercise 1
Use hey
to generate load against the server in example 1. Close the server with ctrl-c while hey
is running. Change the timeout value in the shutdown code to 100 milliseconds and repeat the exercise.
All material is licensed under the Apache License Version 2.0, January 2004 .
Expand ▾
Collapse ▴
Directories
¶
This program shows how to launch a web server then shut it down gracefully.
This program shows how to launch a web server then shut it down gracefully.
Click to show internal directories.
Click to hide internal directories.