Class AsyncConnection (2.19.0)

The *Connection object for AsyncClient.

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
TypeDescription
Options

AsyncInsertObject(InsertObjectParams)

Insert a new object.

Parameter
NameDescription
p InsertObjectParams
Returns
TypeDescription
future< StatusOr< storage::ObjectMetadata > >

AsyncReadObject(ReadObjectParams)

Asynchronously create a stream to read object contents.

Parameter
NameDescription
p ReadObjectParams
Returns
TypeDescription
future< StatusOr< std::unique_ptr< AsyncReaderConnection > > >

AsyncReadObjectRange(ReadObjectParams)

Read a range from an object returning all the contents.

Parameter
NameDescription
p ReadObjectParams
Returns
TypeDescription
future< AsyncReadObjectRangeResponse >

AsyncWriteObject(WriteObjectParams)

Start (or resume) a streaming write.

Parameter
NameDescription
p WriteObjectParams
Returns
TypeDescription
future< StatusOr< std::unique_ptr< storage_experimental::AsyncWriterConnection > > >

AsyncComposeObject(ComposeObjectParams)

Create a new object by composing (concatenating) the contents of existing objects.

Parameter
NameDescription
p ComposeObjectParams
Returns
TypeDescription
future< StatusOr< storage::ObjectMetadata > >

AsyncDeleteObject(DeleteObjectParams)

Delete an object.

Parameter
NameDescription
p DeleteObjectParams
Returns
TypeDescription
future< Status >