Renaming ShutdownSignals -> Shutdown (#1553)
This commit is contained in:
parent
e5c215556e
commit
075d7d4fef
@ -200,7 +200,8 @@ func Run() error {
|
||||
}
|
||||
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, signalutil.ShutdownSignals()...)
|
||||
signal.Notify(ch, signalutil.Shutdown()...)
|
||||
|
||||
if logger.V(logger.InfoLevel, log) {
|
||||
log.Infof("Received signal %s", <-ch)
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ func (s *service) Run() error {
|
||||
|
||||
ch := make(chan os.Signal, 1)
|
||||
if s.opts.Signal {
|
||||
signal.Notify(ch, signalutil.ShutdownSignals()...)
|
||||
signal.Notify(ch, signalutil.Shutdown()...)
|
||||
}
|
||||
|
||||
select {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
// ShutDownSingals returns all the singals that are being watched for to shut down services.
|
||||
func ShutdownSignals() []os.Signal {
|
||||
func Shutdown() []os.Signal {
|
||||
return []os.Signal{
|
||||
syscall.SIGTERM, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGKILL,
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ func (s *service) Run() error {
|
||||
|
||||
ch := make(chan os.Signal, 1)
|
||||
if s.opts.Signal {
|
||||
signal.Notify(ch, signalutil.ShutdownSignals()...)
|
||||
signal.Notify(ch, signalutil.Shutdown()...)
|
||||
}
|
||||
|
||||
select {
|
||||
|
Loading…
x
Reference in New Issue
Block a user