mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
16 lines
341 B
Go
16 lines
341 B
Go
//go:build unix
|
|
|
|
package shutdown
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// GetSignals returns the appropriate signals to catch for a clean shutdown, dependent on the OS.
|
|
//
|
|
// On Unix-like operating systems, it is important to catch SIGTERM in addition to SIGINT.
|
|
func GetSignals() []os.Signal {
|
|
return []os.Signal{os.Interrupt, syscall.SIGTERM}
|
|
}
|