Add a generic registerShutdown function for graceful exit (#2344)

* Add a generic registerShutdown function for graceful exit
* Add shutdown callback test case
This commit is contained in:
Anis Elleuch
2016-08-05 22:48:31 +02:00
committed by Harshavardhana
parent 62c0612eac
commit d28fb5fe23
7 changed files with 127 additions and 21 deletions
+8
View File
@@ -18,6 +18,14 @@ package main
import "errors"
// errCode represents the return status of shutdown functions
type errCode int
const (
exitFailure errCode = -1
exitSuccess errCode = 0
)
// errSyslogNotSupported - this message is only meaningful on windows
var errSyslogNotSupported = errors.New("Syslog logger not supported on windows")