This repo is the graceful shutdown sample in Golang
go run .
- Run the service
- Open the other terminal, request to the API using this command line
curl -X GET http://localhost:8080/api/v1/test-graceful-shutdown
or open Postman, use get request to URL: http://localhost:8080/api/v1/test-graceful-shutdown - Back to the service terminal and stop the service:
Ctrl + C
- Waiting the response from api