hashicorp-demoapp / product-api-go

Products API written in Go
Mozilla Public License 2.0
42 stars 26 forks source link

Add a non-disruptive reload option #28

Open omkensey opened 1 year ago

omkensey commented 1 year ago

Since the product-api service connects to a database, the connection string may change if the database itself or the credentials to access it change -- this is commonly the case with Vault dynamic database credentials. Currently it is not possible to get the app to reload its config except by completely restarting it; a reload/reconnect on receipt of a HUP or USR1 process signal or triggered by a call to an API endpoint would make the app much smoother to use with something like Vault Agent.