-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Description: We've run into a few situations internally where we would like to be able to create objects that will be destroyed at server shutdown or simply be notified of server shutdown. It's been difficult to do this in the context of a statically registered factories because the statically registered component is never destructed or notified of shutdown, and the elements it produces generally share their lifetime with the config that they are associated with rather than the process itself. Our use cases revolve around the graceful shutdown of shared, long-lived clients that dispatch RPCs asynchronously. I think this is a broad problem that may motivate an Envoy-wide solution rather than something that we put together in a proprietary context. If there is an existing solution to this problem in Envoy, feel free to chime in.