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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
std::string |
|
WriteHandle() const
Returns the latest write handle, if any.
This function is implemented using gMock's MOCK_METHOD().
Consult the gMock documentation to use this mock in your tests.
| Returns | |
|---|---|
| Type | Description |
absl::optional< google::storage::v2::BidiWriteHandle > |
|
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 | |
|---|---|
| Type | Description |
absl::variant< std::int64_t, google::storage::v2::Object > |
|
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 | |
|---|---|
| Name | Description |
payload |
WritePayload
|
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
|
WritePayload
|
| Returns | |
|---|---|
| Type | Description |
future< StatusOr< google::storage::v2::Object > > |
|
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 | |
|---|---|
| Name | Description |
payload |
WritePayload
|
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
future< StatusOr< std::int64_t > > |
|
GetRequestMetadata()
Return the request metadata.
This function is implemented using gMock's MOCK_METHOD().
Consult the gMock documentation to use this mock in your tests.
| Returns | |
|---|---|
| Type | Description |
RpcMetadata |
|