pub struct OperationClient { /* private fields */ }Expand description
Calls OperationService.
The long-running operations of a service: what its creates, updates and deletes answer with, until their resource settles. Every service serves this at its own host, for the operations its own methods return.
An operation is done when its resource reaches the state its method promises, or failed when it can’t get there; that outcome never changes afterwards, whatever later happens to the resource. It can be read for a day after it is done.
Implementations§
Source§impl OperationClient
impl OperationClient
Sourcepub fn new(service: &Service) -> Self
pub fn new(service: &Service) -> Self
Returns a client of OperationService at service, the endpoint of another service’s client: every service serves it at its own host.
Sourcepub async fn get_operation(
&self,
request: GetOperationRequest,
) -> Result<Operation, Error>
pub async fn get_operation( &self, request: GetOperationRequest, ) -> Result<Operation, Error>
Returns an operation as it is now.
Sourcepub async fn wait_operation(
&self,
request: WaitOperationRequest,
) -> Result<Operation, Error>
pub async fn wait_operation( &self, request: WaitOperationRequest, ) -> Result<Operation, Error>
Waits until an operation is done or timeout has passed, whichever
comes first, and returns it as it is then. It only reads, so a client
may repeat it after a transport error.