@azure/core-lro package
Interfaces
CreateHttpPollerOptions |
Options for |
OperationConfig |
Configurations for how to poll the operation and to check whether it has terminated. |
OperationResponse |
The type of the response of a LRO. |
OperationState |
While the poller works as the local control mechanism to start triggering and wait for a long-running operation, OperationState documents the status of the remote long-running operation. It gets updated after each poll. |
PollerLike |
A poller for an operation. |
RawRequest |
Simple type of the raw request. |
RawResponse |
Simple type of the raw response. |
RunningOperation |
Description of a long running operation. |
Type Aliases
CancelOnProgress |
CancelOnProgress is used as the return value of a Poller's onProgress method. When a user invokes onProgress, they're required to pass in a function that will be called as a callback with the new data received each time the poll operation is updated. onProgress returns a function that will prevent any further update to reach the original callback. |
OperationStatus |
The set of possible states an operation can be in at any given time. |
ResourceLocationConfig |
The potential location of the result of the LRO if specified by the LRO extension in the swagger. |
RestorableOperationState |
Type of a restorable long-running operation. |
Functions
create |
Creates a poller that can be used to poll a long-running operation. |
deserialize |
Deserializes the state |
Function Details
createHttpPoller<TResult, TState>(RunningOperation<unknown>, CreateHttpPollerOptions<TResult, TState>)
Creates a poller that can be used to poll a long-running operation.
function createHttpPoller<TResult, TState>(lro: RunningOperation<unknown>, options?: CreateHttpPollerOptions<TResult, TState>): PollerLike<TState, TResult>
Parameters
- lro
-
RunningOperation<unknown>
Description of the long-running operation
- options
-
CreateHttpPollerOptions<TResult, TState>
options to configure the poller
Returns
PollerLike<TState, TResult>
an initialized poller
deserializeState<TResult, TState>(string)
Deserializes the state
function deserializeState<TResult, TState>(serializedState: string): RestorableOperationState<TResult, TState>
Parameters
- serializedState
-
string
Returns
RestorableOperationState<TResult, TState>