This interface defines virtual methods for each of the user-facing overload sets in AsyncClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type AsyncClient.
To create a concrete instance, see MakeAsyncConnection().
For mocking, see storage_mocks::MockAsyncConnection.
Functions
options() const
Returns
Type
Description
Options
AsyncInsertObject(InsertObjectParams)
Insert a new object.
Parameter
Name
Description
p
InsertObjectParams
Returns
Type
Description
future< StatusOr< storage::ObjectMetadata > >
AsyncReadObject(ReadObjectParams)
Asynchronously create a stream to read object contents.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-22 UTC."],[[["This document provides documentation for the `AsyncConnection` class, an interface that defines virtual methods for overloads found in `AsyncClient`, enabling users to inject custom behavior during testing."],["The latest version documented is `2.37.0-rc`, with a list of other past versions extending down to version `2.11.0`, and the current document focusing on the 2.16.0 version."],["`AsyncConnection` offers functions such as `AsyncInsertObject`, `AsyncReadObject`, `AsyncReadObjectRange`, `AsyncComposeObject`, and `AsyncDeleteObject`, each designed for specific asynchronous operations with Google Cloud Storage."],["The document details the parameters and return types for each of the `AsyncConnection` functions, for example the `AsyncInsertObject` function takes an `InsertObjectParams` parameter, and returns a `future\u003c StatusOr\u003c storage::ObjectMetadata \u003e \u003e` type."],["It is possible to mock the functionality of this connection with `storage_mocks::MockAsyncConnection`, and a concrete instance can be created with the `MakeAsyncConnection()` function."]]],[]]