grpc-swift
grpc-swift copied to clipboard
lifecycle hooks for service providers
Many service providers need other resources to provide their service. Therefore I'd expect to have lifecycle hooks for at least when the service provider gets started and stopped. Those would make a great place to then construct/destroy the resources the service provider needs.
The solution could be as simple as providing (asynchronous) willStart and willStop (or similar) hooks to the service provider protocols that get automatically called by the framework at the appropriate times.