Skip to content

Add support for creating asynchronous gRPC channels

Adam Coldrick requested to merge sotk/browser/async-channels into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Rather than writing a bunch of new unit tests here, my intention is to provide test coverage of this new (currently unused) API surface as part of the bgd-browser backend code's (which will use it) tests in a further MR.

Description

This MR adds support to setup_channel for specifying whether the channel should be created with the synchronous gRPC code, or the new asynchronous API. These async channels allow us to await gRPC requests, which we'll want to do in the bgd-browser backend code. Other than the interceptor mess in this MR, they provide a drop-in replacement for the synchronous channels.

Changes proposed in this merge request:

  • Refactor our client-side interceptors to share code with async implementations
  • Allow setup_channel to create async gRPC channels

Issues addressed

Part of #362 (closed)

Merge request reports