File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,24 @@ class ExampleResponseWrapper:
7070 def __init__(self, response: ExampleResponse):
7171 self.transformed_value = f"{response.float_value:.2f}"
7272
73+ # Change defaults as needed
74+ DEFAULT_CHANNEL_OPTIONS = ChannelOptions()
75+
7376 class MyApiClient(BaseApiClient[ExampleAsyncStub]):
74- def __init__(self, server_url: str, *, connect: bool = True):
77+ def __init__(
78+ self,
79+ server_url: str,
80+ *,
81+ connect: bool = True,
82+ channel_defaults: ChannelOptions = DEFAULT_CHANNEL_OPTIONS,
83+ ) -> None:
7584 super().__init__(
7685 server_url,
7786 # We need to type ignore here because the generated normal and
7887 # async stubs are not type-compatible with each other.
7988 ExampleStub, # type: ignore[arg-type]
8089 connect=connect
90+ channel_defaults=channel_defaults,
8191 )
8292 self._broadcaster = GrpcStreamBroadcaster(
8393 "stream",
You can’t perform that action at this time.
0 commit comments