go-graceful-restart-example

command module
v0.0.0-...-364094e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2014 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Server graceful restart with Go

Install and run the server

$ go get github.com/Scalingo/go-graceful-restart-example
$ go-graceful-restart-example
2014/12/14 20:26:42 [Server - 4301] Listen on [::]:12345
[...]

Connect with the client

$ cd $GOPATH/src/github.com/Scalingo/go-graceful-restart-example/client
$ go run pong.go

Graceful restart

# The server pid is included in its log, in the example: 4301

$ kill -HUP <server pid>

Stop with timeout

Let 10 seconds for the current requests to finish.

$ kill -TERM <server pid>

Gist of output

https://gist.github.com/Soulou/7ca6a2d4f475f8e2345e

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL