Skip to content

efureev/go-shutdown

Repository files navigation

Go package Build Status Go Report Card Codacy Badge Maintainability

Shutdown

It's a package for graceful shutdown your app or process

Install

go get -u github.com/efureev/go-shutdown

Golang app shutdown.

Examples

import "github.com/efureev/go-shutdown"

func main() {
	//..
    
    shutdown.Wait()
}
import "github.com/efureev/go-shutdown"

func main() {
	//..
    
    shutdown.WaitWithLogger(logger, syscall.SIGINT, syscall.SIGTERM)
}
import "github.com/efureev/go-shutdown"

func main() {
	//..
    
    shutdown.
        OnDestroy(func() {
            module.processing.EndJobListen()
        }).
        SetLogger(module.Log()).
        Wait()
}

About

Golang app shutdown

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published