Skip to content

Instantly share code, notes, and snippets.

@beberlei
Created May 4, 2020 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beberlei/a5a93355db1b9ae1b58c24579d1d9ec7 to your computer and use it in GitHub Desktop.
Save beberlei/a5a93355db1b9ae1b58c24579d1d9ec7 to your computer and use it in GitHub Desktop.
go apmServer.Run()
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, os.Interrupt, os.Kill, syscall.SIGTERM)
sig := <-sigc
log.Printf("Caught signal %s: shutting down.", sig)
apmServer.Shutdown(true)
os.Exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment