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