This makes sure that everything shuts down before returning from the function by doing all channel communications in select statements with context. It also handles errors nicely (I updated them to include appropriate gRPC error codes when possible).
This makes sure that everything shuts down before returning from the function by doing all channel communications in select statements with context. It also handles errors nicely (I updated them to include appropriate gRPC error codes when possible).