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:
70
70
def __init__(self, response: ExampleResponse):
71
71
self.transformed_value = f"{response.float_value:.2f}"
72
72
73
+ # Change defaults as needed
74
+ DEFAULT_CHANNEL_OPTIONS = ChannelOptions()
75
+
73
76
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:
75
84
super().__init__(
76
85
server_url,
77
86
# We need to type ignore here because the generated normal and
78
87
# async stubs are not type-compatible with each other.
79
88
ExampleStub, # type: ignore[arg-type]
80
89
connect=connect
90
+ channel_defaults=channel_defaults,
81
91
)
82
92
self._broadcaster = GrpcStreamBroadcaster(
83
93
"stream",
You can’t perform that action at this time.
0 commit comments