Skip to content

Return final resource from Poller #2757

@heaths

Description

@heaths

Splitting up #2458 into different tasks in priority order. This is to add an IntoFuture implementation driven by the Stream on the Poller to refresh the status monitor. We'd probably want IntoFuture so we take ownership from the stream, thereby invalidating the stream from that point on.

The impl<M: StatusMonitor> Future<Output = M::Output> for Poller<M> would return an azure_core::Result<M::Output>1 where we'll do a final GET based on the final state designation - or just return the already-deserialized result from the status monitor if defined according to current guidelines - if PollerStatus::Succeeded. For any other terminal state we'd return an azure_core::Error.

We may want to add an azure_core::error::ErrorKind::Canceled for user- or service-initiated cancellations. This wouldn't be if the dev canceled the Future by dropping it, mind you. It would correspond to PollerStatus::Canceled and may be actionable if a caller can distinguish the LRO was cancelled.

Footnotes

  1. Exact design is open to change, but this it the POR implementation.

Metadata

Metadata

Assignees

Labels

Azure.CoreThe azure_core crateClientThis issue points to a problem in the data-plane of the library.blocking-releaseBlocks release

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions