Skip to content

hanagantig/gracy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

gracy

A small tool that helps you with gracefull shutdown.

Getting started

To download the package, run:

go get github.com/hanagantig/gracy

Import it in your program as:

import "github.com/hanagantig/gracy"

A simple usage:

myServer := http.NewServer()
gracy.AddCallback(func() error {
  return myServer.Stop()
})

err := gracy.Wait()
if err != nil {
	logger.Error("failed to gracefully shutdown server")
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages