MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / handleSignals

Function handleSignals

cmd/server/main.go:57–65  ·  view source on GitHub ↗
(sig os.Signal)

Source from the content-addressed store, hash-verified

55}
56
57func handleSignals(sig os.Signal) (exitNow bool) {
58 switch sig {
59 case syscall.SIGINT, syscall.SIGTERM:
60 logger.Get().With(zap.String("signal", sig.String())).Info("Got signal to exit")
61 return true
62 default:
63 return false
64 }
65}
66
67func main() {
68 defer logger.Sync()

Callers 1

registerSignalFunction · 0.85

Calls 3

GetFunction · 0.92
InfoMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected