Use context in Server

This commit is contained in:
SALLEYRON Julien 2018-03-14 13:14:03 +01:00 committed by Traefiker Bot
parent 526a04d4c8
commit f99363674b
5 changed files with 47 additions and 36 deletions

View file

@ -2,25 +2,6 @@
package server
import (
"os/signal"
"syscall"
func (s *Server) configureSignals() {}
"github.com/containous/traefik/log"
)
func (s *Server) configureSignals() {
signal.Notify(s.signals, syscall.SIGINT, syscall.SIGTERM)
}
func (s *Server) listenSignals() {
for {
sig := <-s.signals
switch sig {
default:
log.Infof("I have to go... %+v", sig)
log.Info("Stopping server")
s.Stop()
}
}
}
func (s *Server) listenSignals() {}