Class MockAsyncWriterConnection (2.19.0)

Functions

Cancel()

Cancels the streaming RPC, terminating any pending operations.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
void

UploadId() const

Returns the upload id. Used to checkpoint the state and resume uploads.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
std::string

PersistedState() const

Returns the last known state of the upload.

Updated during initialization and by successful Query() or Finalize() requests.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
absl::variant< std::int64_t, storage::ObjectMetadata >

Write(WritePayload)

Uploads some data to the service.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
payload WritePayload
Returns
TypeDescription
future< Status >

Finalize(WritePayload)

Finalizes an upload.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
WritePayload
Returns
TypeDescription
future< StatusOr< storage::ObjectMetadata > >

Flush(WritePayload)

Uploads some data to the service and flushes the value.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
payload WritePayload
Returns
TypeDescription
future< Status >

Query()

Wait for the result of a Flush() call.

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
future< StatusOr< std::int64_t > >