https://github.com/efureev/go-shutdown
Golang app shutdown
https://github.com/efureev/go-shutdown
graceful-shutdown shutdown
Last synced: about 2 months ago
JSON representation
Golang app shutdown
- Host: GitHub
- URL: https://github.com/efureev/go-shutdown
- Owner: efureev
- License: mit
- Created: 2020-02-05T09:22:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T13:27:54.000Z (about 5 years ago)
- Last Synced: 2025-01-15T09:02:40.365Z (3 months ago)
- Topics: graceful-shutdown, shutdown
- Language: Go
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://travis-ci.com/efureev/go-shutdown)
[](https://goreportcard.com/report/github.com/efureev/go-shutdown)
[](https://www.codacy.com/manual/efureev/go-shutdown?utm_source=github.com&utm_medium=referral&utm_content=efureev/go-shutdown&utm_campaign=Badge_Grade)
[](https://codeclimate.com/github/efureev/go-shutdown/maintainability)# Shutdown
It's a package for graceful shutdown your app or process
## Install
```bash
go get -u github.com/efureev/go-shutdown
```Golang app shutdown.
## Examples
```go
import "github.com/efureev/go-shutdown"func main() {
//..
shutdown.Wait()
}
``````go
import "github.com/efureev/go-shutdown"func main() {
//..
shutdown.WaitWithLogger(logger, syscall.SIGINT, syscall.SIGTERM)
}
```
```go
import "github.com/efureev/go-shutdown"func main() {
//..
shutdown.
OnDestroy(func() {
module.processing.EndJobListen()
}).
SetLogger(module.Log()).
Wait()
}
```