This PR adds a simple route /api/v1/admin/shutdown which cancels the App main context and shuts down the running gnmic server.
In our environment we run gnmic in k8s and have an in-memory datastore. When we detect that this datastore has failed/crashed for some reason we would like a way to signal gnmic to restart immediately to trigger resubscription/resync of all paths.
Let me know if you have any feedback on this or have another approach you'd recommend.
Howdy!
This PR adds a simple route
/api/v1/admin/shutdown
which cancels theApp
main context and shuts down the runninggnmic
server.In our environment we run
gnmic
in k8s and have an in-memory datastore. When we detect that this datastore has failed/crashed for some reason we would like a way to signalgnmic
to restart immediately to trigger resubscription/resync of all paths.Let me know if you have any feedback on this or have another approach you'd recommend.