| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8e21a7f commit e730bf5
17 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,7 +114,7 @@ class AsyncAppendableObjectWriter: | |||
| 114 | 114 | ||
| 115 | 115 | def __init__( | |
| 116 | 116 | self, | |
| 117 | - client: AsyncGrpcClient.grpc_client, | ||
| 117 | + client: AsyncGrpcClient, | ||
| 118 | 118 | bucket_name: str, | |
| 119 | 119 | object_name: str, | |
| 120 | 120 | generation: Optional[int] = None, | |
@@ -155,7 +155,7 @@ def __init__( | |||
| 155 | 155 | await writer.close() | |
| 156 | 156 | ``` | |
| 157 | 157 | ||
| 158 | - :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient.grpc_client` | ||
| 158 | + :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient` | ||
| 159 | 159 | :param client: async grpc client to use for making API requests. | |
| 160 | 160 | ||
| 161 | 161 | :type bucket_name: str | |
@@ -304,7 +304,7 @@ async def _do_open(): | |||
| 304 | 304 | self._is_stream_open = False | |
| 305 | 305 | ||
| 306 | 306 | self.write_obj_stream = _AsyncWriteObjectStream( | |
| 307 | - client=self.client, | ||
| 307 | + client=self.client.grpc_client, | ||
| 308 | 308 | bucket_name=self.bucket_name, | |
| 309 | 309 | object_name=self.object_name, | |
| 310 | 310 | generation_number=self.generation, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -125,7 +125,7 @@ class AsyncMultiRangeDownloader: | |||
| 125 | 125 | @classmethod | |
| 126 | 126 | async def create_mrd( | |
| 127 | 127 | cls, | |
| 128 | - client: AsyncGrpcClient.grpc_client, | ||
| 128 | + client: AsyncGrpcClient, | ||
| 129 | 129 | bucket_name: str, | |
| 130 | 130 | object_name: str, | |
| 131 | 131 | generation_number: Optional[int] = None, | |
@@ -136,7 +136,7 @@ async def create_mrd( | |||
| 136 | 136 | """Initializes a MultiRangeDownloader and opens the underlying bidi-gRPC | |
| 137 | 137 | object for reading. | |
| 138 | 138 | ||
| 139 | - :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient.grpc_client` | ||
| 139 | + :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient` | ||
| 140 | 140 | :param client: The asynchronous client to use for making API requests. | |
| 141 | 141 | ||
| 142 | 142 | :type bucket_name: str | |
@@ -168,7 +168,7 @@ async def create_mrd( | |||
| 168 | 168 | ||
| 169 | 169 | def __init__( | |
| 170 | 170 | self, | |
| 171 | - client: AsyncGrpcClient.grpc_client, | ||
| 171 | + client: AsyncGrpcClient, | ||
| 172 | 172 | bucket_name: str, | |
| 173 | 173 | object_name: str, | |
| 174 | 174 | generation_number: Optional[int] = None, | |
@@ -177,7 +177,7 @@ def __init__( | |||
| 177 | 177 | """Constructor for AsyncMultiRangeDownloader, clients are not adviced to | |
| 178 | 178 | use it directly. Instead it's adviced to use the classmethod `create_mrd`. | |
| 179 | 179 | ||
| 180 | - :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient.grpc_client` | ||
| 180 | + :type client: :class:`~google.cloud.storage._experimental.asyncio.async_grpc_client.AsyncGrpcClient` | ||
| 181 | 181 | :param client: The asynchronous client to use for making API requests. | |
| 182 | 182 | ||
| 183 | 183 | :type bucket_name: str | |
@@ -273,7 +273,7 @@ async def _do_open(): | |||
| 273 | 273 | self._is_stream_open = False | |
| 274 | 274 | ||
| 275 | 275 | self.read_obj_str = _AsyncReadObjectStream( | |
| 276 | - client=self.client, | ||
| 276 | + client=self.client.grpc_client, | ||
| 277 | 277 | bucket_name=self.bucket_name, | |
| 278 | 278 | object_name=self.object_name, | |
| 279 | 279 | generation_number=self.generation_number, | |
@@ -432,7 +432,7 @@ async def generator(): | |||
| 432 | 432 | ||
| 433 | 433 | # Re-initialize stream | |
| 434 | 434 | self.read_obj_str = _AsyncReadObjectStream( | |
| 435 | - client=self.client, | ||
| 435 | + client=self.client.grpc_client, | ||
| 436 | 436 | bucket_name=self.bucket_name, | |
| 437 | 437 | object_name=self.object_name, | |
| 438 | 438 | generation_number=self.generation_number, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,7 +35,7 @@ async def storage_create_and_write_appendable_object( | |||
| 35 | 35 | """ | |
| 36 | 36 | ||
| 37 | 37 | if grpc_client is None: | |
| 38 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 38 | + grpc_client = AsyncGrpcClient() | ||
| 39 | 39 | writer = AsyncAppendableObjectWriter( | |
| 40 | 40 | client=grpc_client, | |
| 41 | 41 | bucket_name=bucket_name, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ async def storage_finalize_appendable_object_upload( | |||
| 33 | 33 | """ | |
| 34 | 34 | ||
| 35 | 35 | if grpc_client is None: | |
| 36 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 36 | + grpc_client = AsyncGrpcClient() | ||
| 37 | 37 | writer = AsyncAppendableObjectWriter( | |
| 38 | 38 | client=grpc_client, | |
| 39 | 39 | bucket_name=bucket_name, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ async def storage_open_multiple_objects_ranged_read( | |||
| 36 | 36 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 37 | 37 | """ | |
| 38 | 38 | if grpc_client is None: | |
| 39 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 39 | + grpc_client = AsyncGrpcClient() | ||
| 40 | 40 | ||
| 41 | 41 | async def _download_range(object_name): | |
| 42 | 42 | """Helper coroutine to download a range from a single object.""" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ async def storage_open_object_multiple_ranged_read( | |||
| 33 | 33 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 34 | 34 | """ | |
| 35 | 35 | if grpc_client is None: | |
| 36 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 36 | + grpc_client = AsyncGrpcClient() | ||
| 37 | 37 | ||
| 38 | 38 | mrd = AsyncMultiRangeDownloader(grpc_client, bucket_name, object_name) | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ async def storage_open_object_read_full_object( | |||
| 33 | 33 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 34 | 34 | """ | |
| 35 | 35 | if grpc_client is None: | |
| 36 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 36 | + grpc_client = AsyncGrpcClient() | ||
| 37 | 37 | ||
| 38 | 38 | # mrd = Multi-Range-Downloader | |
| 39 | 39 | mrd = AsyncMultiRangeDownloader(grpc_client, bucket_name, object_name) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ async def storage_open_object_single_ranged_read( | |||
| 33 | 33 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 34 | 34 | """ | |
| 35 | 35 | if grpc_client is None: | |
| 36 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 36 | + grpc_client = AsyncGrpcClient() | ||
| 37 | 37 | ||
| 38 | 38 | mrd = AsyncMultiRangeDownloader(grpc_client, bucket_name, object_name) | |
| 39 | 39 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ async def storage_pause_and_resume_appendable_upload( | |||
| 32 | 32 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 33 | 33 | """ | |
| 34 | 34 | if grpc_client is None: | |
| 35 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 35 | + grpc_client = AsyncGrpcClient() | ||
| 36 | 36 | ||
| 37 | 37 | writer1 = AsyncAppendableObjectWriter( | |
| 38 | 38 | client=grpc_client, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,7 +90,7 @@ async def read_appendable_object_tail( | |||
| 90 | 90 | grpc_client: an existing grpc_client to use, this is only for testing. | |
| 91 | 91 | """ | |
| 92 | 92 | if grpc_client is None: | |
| 93 | - grpc_client = AsyncGrpcClient().grpc_client | ||
| 93 | + grpc_client = AsyncGrpcClient() | ||
| 94 | 94 | writer = AsyncAppendableObjectWriter( | |
| 95 | 95 | client=grpc_client, | |
| 96 | 96 | bucket_name=bucket_name, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments