Struct google_api_proto::google::devtools::resultstore::v2::result_store_upload_client::ResultStoreUploadClient
source · pub struct ResultStoreUploadClient<T> { /* private fields */ }
Expand description
This is the interface used to upload information to the ResultStore database, to update that information as necessary, and to make it immutable at the end.
This interface intentionally does not support user read-modify-write operations. They may corrupt data, and are too expensive. For the same reason, all upload RPCs will return no resource fields except name and ID. An uploader should hold as little state as possible in memory to avoid running out of memory.
Implementations§
source§impl<T> ResultStoreUploadClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ResultStoreUploadClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> ResultStoreUploadClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_invocation(
&mut self,
request: impl IntoRequest<CreateInvocationRequest>
) -> Result<Response<Invocation>, Status>
pub async fn create_invocation( &mut self, request: impl IntoRequest<CreateInvocationRequest> ) -> Result<Response<Invocation>, Status>
Creates the given invocation.
This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Invocation proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If an invocation with the same ID already exists.
sourcepub async fn update_invocation(
&mut self,
request: impl IntoRequest<UpdateInvocationRequest>
) -> Result<Response<Invocation>, Status>
pub async fn update_invocation( &mut self, request: impl IntoRequest<UpdateInvocationRequest> ) -> Result<Response<Invocation>, Status>
Applies a standard update to the invocation identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given invocation are cleared. This is an implicitly idempotent API.
Returns an empty Invocation proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the invocation does not exist.
- If the invocation is finalized.
- If no field mask was given.
sourcepub async fn merge_invocation(
&mut self,
request: impl IntoRequest<MergeInvocationRequest>
) -> Result<Response<Invocation>, Status>
pub async fn merge_invocation( &mut self, request: impl IntoRequest<MergeInvocationRequest> ) -> Result<Response<Invocation>, Status>
Applies a merge update to the invocation identified by the given proto’s name. For primitive and message fields, replaces them with the ones in the given proto if they are covered under the field mask paths. For repeated fields, merges to them with the given ones if they are covered under the field mask paths. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Invocation proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the invocation does not exist.
- If the invocation is finalized.
- If no field mask was given.
sourcepub async fn touch_invocation(
&mut self,
request: impl IntoRequest<TouchInvocationRequest>
) -> Result<Response<TouchInvocationResponse>, Status>
pub async fn touch_invocation( &mut self, request: impl IntoRequest<TouchInvocationRequest> ) -> Result<Response<TouchInvocationResponse>, Status>
Touches the invocation identified by the given proto’s name.
This is useful when you need to notify ResultStore that you haven’t abandoned the upload, since abandoned uploads will be automatically finalized after a set period.
An error will be reported in the following cases:
- If the invocation does not exist.
- If the invocation is finalized.
sourcepub async fn finalize_invocation(
&mut self,
request: impl IntoRequest<FinalizeInvocationRequest>
) -> Result<Response<FinalizeInvocationResponse>, Status>
pub async fn finalize_invocation( &mut self, request: impl IntoRequest<FinalizeInvocationRequest> ) -> Result<Response<FinalizeInvocationResponse>, Status>
Declares the invocation with the given name as finalized and immutable by the user. It may still be mutated by post-processing. This is an implicitly idempotent API.
If an Invocation is not updated for 24 hours, some time after that this will be called automatically.
An error will be reported in the following cases:
- If the invocation does not exist.
sourcepub async fn delete_invocation(
&mut self,
request: impl IntoRequest<DeleteInvocationRequest>
) -> Result<Response<()>, Status>
pub async fn delete_invocation( &mut self, request: impl IntoRequest<DeleteInvocationRequest> ) -> Result<Response<()>, Status>
Deletes an immutable invocation (permanently) Note: this does not delete indirect data, e.g. files stored in other services.
An error will be reported in the following cases:
- If the invocation does not exist.
- If the invocation is not finalized. This can be retried until it is.
sourcepub async fn create_target(
&mut self,
request: impl IntoRequest<CreateTargetRequest>
) -> Result<Response<Target>, Status>
pub async fn create_target( &mut self, request: impl IntoRequest<CreateTargetRequest> ) -> Result<Response<Target>, Status>
Creates the given target under the given parent invocation. The given target ID is URL encoded, converted to the full resource name, and assigned to the target’s name field. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Target proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If no target ID is provided.
- If the parent invocation does not exist.
- If the parent invocation is finalized.
- If a target with the same name already exists.
sourcepub async fn update_target(
&mut self,
request: impl IntoRequest<UpdateTargetRequest>
) -> Result<Response<Target>, Status>
pub async fn update_target( &mut self, request: impl IntoRequest<UpdateTargetRequest> ) -> Result<Response<Target>, Status>
Applies a standard update to the target identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given target are cleared. This is an implicitly idempotent API.
Returns an empty Target proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the target does not exist.
- If the target or parent invocation is finalized.
- If no field mask was given.
sourcepub async fn merge_target(
&mut self,
request: impl IntoRequest<MergeTargetRequest>
) -> Result<Response<Target>, Status>
pub async fn merge_target( &mut self, request: impl IntoRequest<MergeTargetRequest> ) -> Result<Response<Target>, Status>
Applies a merge update to the target identified by the given proto’s name. For primitive and message fields, replaces them with the ones in the given proto if they are covered under the field mask paths. For repeated fields, merges to them with the given ones if they are covered under the field mask paths. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Target proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the target does not exist.
- If the target or parent invocation is finalized.
- If no field mask was given.
sourcepub async fn finalize_target(
&mut self,
request: impl IntoRequest<FinalizeTargetRequest>
) -> Result<Response<FinalizeTargetResponse>, Status>
pub async fn finalize_target( &mut self, request: impl IntoRequest<FinalizeTargetRequest> ) -> Result<Response<FinalizeTargetResponse>, Status>
Declares the target with the given name as finalized and immutable by the user. It may still be mutated by post-processing. This is an implicitly idempotent API.
An error will be reported in the following cases:
- If the target does not exist.
sourcepub async fn create_configured_target(
&mut self,
request: impl IntoRequest<CreateConfiguredTargetRequest>
) -> Result<Response<ConfiguredTarget>, Status>
pub async fn create_configured_target( &mut self, request: impl IntoRequest<CreateConfiguredTargetRequest> ) -> Result<Response<ConfiguredTarget>, Status>
Creates the given configured target under the given parent target. The given configured target ID is URL encoded, converted to the full resource name, and assigned to the configured target’s name field. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty ConfiguredTarget proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If no config ID is provided.
- If a configured target with the same ID already exists.
- If the parent target does not exist.
- If the parent target or invocation is finalized.
sourcepub async fn update_configured_target(
&mut self,
request: impl IntoRequest<UpdateConfiguredTargetRequest>
) -> Result<Response<ConfiguredTarget>, Status>
pub async fn update_configured_target( &mut self, request: impl IntoRequest<UpdateConfiguredTargetRequest> ) -> Result<Response<ConfiguredTarget>, Status>
Applies a standard update to the configured target identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given configured target are cleared. This is an implicitly idempotent API.
Returns an empty ConfiguredTarget proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the configured target does not exist.
- If the parent target or invocation is finalized.
- If no field mask was given.
sourcepub async fn merge_configured_target(
&mut self,
request: impl IntoRequest<MergeConfiguredTargetRequest>
) -> Result<Response<ConfiguredTarget>, Status>
pub async fn merge_configured_target( &mut self, request: impl IntoRequest<MergeConfiguredTargetRequest> ) -> Result<Response<ConfiguredTarget>, Status>
Applies a merge update to the configured target identified by the given proto’s name. For primitive and message fields, replaces them with the ones in the given proto if they are covered under the field mask paths. For repeated fields, merges to them with the given ones if they are covered under the field mask paths. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty ConfiguredTarget proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the configured target does not exist.
- If the parent target or invocation is finalized.
- If no field mask was given.
sourcepub async fn finalize_configured_target(
&mut self,
request: impl IntoRequest<FinalizeConfiguredTargetRequest>
) -> Result<Response<FinalizeConfiguredTargetResponse>, Status>
pub async fn finalize_configured_target( &mut self, request: impl IntoRequest<FinalizeConfiguredTargetRequest> ) -> Result<Response<FinalizeConfiguredTargetResponse>, Status>
Declares the configured target with the given name as finalized and immutable by the user. It may still be mutated by post-processing. This is an implicitly idempotent API.
An error will be reported in the following cases:
- If the configured target does not exist.
sourcepub async fn create_action(
&mut self,
request: impl IntoRequest<CreateActionRequest>
) -> Result<Response<Action>, Status>
pub async fn create_action( &mut self, request: impl IntoRequest<CreateActionRequest> ) -> Result<Response<Action>, Status>
Creates the given action under the given configured target. The given action ID is URL encoded, converted to the full resource name, and assigned to the action’s name field. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Action proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If no action ID provided.
- If the parent configured target does not exist.
- If the parent target or invocation is finalized.
- If an action with the same name already exists.
sourcepub async fn update_action(
&mut self,
request: impl IntoRequest<UpdateActionRequest>
) -> Result<Response<Action>, Status>
pub async fn update_action( &mut self, request: impl IntoRequest<UpdateActionRequest> ) -> Result<Response<Action>, Status>
Applies a standard update to the action identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given action are cleared. This is an implicitly idempotent API.
Returns an empty Action proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the action does not exist.
- If the parent target or invocation is finalized.
- If no field mask was given.
sourcepub async fn merge_action(
&mut self,
request: impl IntoRequest<MergeActionRequest>
) -> Result<Response<Action>, Status>
pub async fn merge_action( &mut self, request: impl IntoRequest<MergeActionRequest> ) -> Result<Response<Action>, Status>
Applies a merge update to the action identified by the given proto’s name. For primitive and message fields, replaces them with the ones in the given proto if they are covered under the field mask paths. For repeated fields, merges to them with the given ones if they are covered under the field mask paths. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Action proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the action does not exist.
- If the parent target or invocation is finalized.
- If no field mask was given.
sourcepub async fn create_configuration(
&mut self,
request: impl IntoRequest<CreateConfigurationRequest>
) -> Result<Response<Configuration>, Status>
pub async fn create_configuration( &mut self, request: impl IntoRequest<CreateConfigurationRequest> ) -> Result<Response<Configuration>, Status>
Creates the given configuration under the given parent invocation. The given configuration ID is URL encoded, converted to the full resource name, and assigned to the configuration’s name field. The configuration ID of “default” should be preferred for the default configuration in a single-config invocation. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty Configuration proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If no configuration ID is provided.
- If the parent invocation does not exist.
- If the parent invocation is finalized.
- If a configuration with the same name already exists.
sourcepub async fn update_configuration(
&mut self,
request: impl IntoRequest<UpdateConfigurationRequest>
) -> Result<Response<Configuration>, Status>
pub async fn update_configuration( &mut self, request: impl IntoRequest<UpdateConfigurationRequest> ) -> Result<Response<Configuration>, Status>
Applies a standard update to the configuration identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given configuration are cleared. This is an implicitly idempotent API.
Returns an empty Configuration proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the configuration does not exist.
- If the parent invocation is finalized.
- If no field mask was given.
- If a given field mask path is not valid.
sourcepub async fn create_file_set(
&mut self,
request: impl IntoRequest<CreateFileSetRequest>
) -> Result<Response<FileSet>, Status>
pub async fn create_file_set( &mut self, request: impl IntoRequest<CreateFileSetRequest> ) -> Result<Response<FileSet>, Status>
Creates the given file set under the given parent invocation. The given file set ID is URL encoded, converted to the full resource name, and assigned to the file set’s name field. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty FileSet proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If no file set ID is provided.
- If a file set with the same name already exists.
- If the parent invocation does not exist.
- If the parent invocation is finalized.
sourcepub async fn update_file_set(
&mut self,
request: impl IntoRequest<UpdateFileSetRequest>
) -> Result<Response<FileSet>, Status>
pub async fn update_file_set( &mut self, request: impl IntoRequest<UpdateFileSetRequest> ) -> Result<Response<FileSet>, Status>
Applies a standard update to the file set identified by the given proto’s name. For all types of fields (primitive, message, or repeated), replaces them with the given proto fields if they are under the given field mask paths. Fields that match the mask but aren’t populated in the given configuration are cleared. This is an implicitly idempotent API.
Returns an empty FileSet proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the file set does not exist.
- If the parent invocation is finalized.
- If no field mask was given.
- If a given field mask path is not valid.
sourcepub async fn merge_file_set(
&mut self,
request: impl IntoRequest<MergeFileSetRequest>
) -> Result<Response<FileSet>, Status>
pub async fn merge_file_set( &mut self, request: impl IntoRequest<MergeFileSetRequest> ) -> Result<Response<FileSet>, Status>
Applies a merge update to the file set identified by the given proto’s name. For primitive and message fields, updates them with the ones in the given proto if they are covered under the field mask paths. For repeated fields, merges to them with the given ones if they are covered under the field mask paths. This is not an implicitly idempotent API, so a request id is required to make it idempotent.
Returns an empty FileSet proto with only the name and ID fields populated.
An error will be reported in the following cases:
- If the file set does not exist.
- If the parent invocation is finalized.
- If a given field mask path is not valid.
- If no field mask was given.
sourcepub async fn upload_batch(
&mut self,
request: impl IntoRequest<UploadBatchRequest>
) -> Result<Response<UploadBatchResponse>, Status>
pub async fn upload_batch( &mut self, request: impl IntoRequest<UploadBatchRequest> ) -> Result<Response<UploadBatchResponse>, Status>
This is the RPC used for batch upload. It supports uploading multiple resources for an invocation in a transaction safe manner.
To use this RPC, the CreateInvocationRequest must have been provided a resume_token.
Combining batch upload with normal upload on a single Invocation is not supported. If an Invocation is created with a resume_token, all further calls must be through UploadBatch. If an Invocation is created without resume_token normal upload, all further upload calls must be through normal upload RPCs.
The recommend total size of UploadBatchRequest is 10 MiB. If it is too large, it may be rejected.
sourcepub async fn get_invocation_upload_metadata(
&mut self,
request: impl IntoRequest<GetInvocationUploadMetadataRequest>
) -> Result<Response<UploadMetadata>, Status>
pub async fn get_invocation_upload_metadata( &mut self, request: impl IntoRequest<GetInvocationUploadMetadataRequest> ) -> Result<Response<UploadMetadata>, Status>
Provides a way to read the metadata for an invocation. The UploadMetadata could still be retrieved by this RPC even the Invocation has been finalized. This API requires setting a response FieldMask via ‘fields’ URL query parameter or X-Goog-FieldMask HTTP/gRPC header.
An error will be reported in the following case:
- If the invocation does not exist.
- If no field mask was given.
Trait Implementations§
source§impl<T: Clone> Clone for ResultStoreUploadClient<T>
impl<T: Clone> Clone for ResultStoreUploadClient<T>
source§fn clone(&self) -> ResultStoreUploadClient<T>
fn clone(&self) -> ResultStoreUploadClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for ResultStoreUploadClient<T>
impl<T> RefUnwindSafe for ResultStoreUploadClient<T>where
T: RefUnwindSafe,
impl<T> Send for ResultStoreUploadClient<T>where
T: Send,
impl<T> Sync for ResultStoreUploadClient<T>where
T: Sync,
impl<T> Unpin for ResultStoreUploadClient<T>where
T: Unpin,
impl<T> UnwindSafe for ResultStoreUploadClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request