你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
@azure/core-lro package
接口
CreateHttpPollerOptions |
用于 |
OperationConfig |
有关如何轮询作和检查作是否已终止的配置。 |
OperationResponse |
LRO 响应的类型。 |
OperationState |
虽然轮询器充当本地控制机制,开始触发并等待长时间运行的作,OperationState 记录远程长时间运行的作的状态。 每次轮询后都会更新它。 |
PollerLike |
作的轮询器。 |
RawRequest |
原始请求的简单类型。 |
RawResponse |
原始响应的简单类型。 |
RunningOperation |
长时间运行的作的说明。 |
类型别名
CancelOnProgress |
CancelOnProgress 用作 Poller onProgress 方法的返回值。 当用户调用 onProgress 时,需要传入一个函数,该函数将在每次更新轮询作时接收新数据作为回调调用。 onProgress 返回一个函数,该函数将阻止任何进一步的更新到达原始回调。 |
OperationStatus |
作可在任意给定时间处于的可能状态集。 |
ResourceLocationConfig |
LRO 扩展在 swagger 中指定的结果的潜在位置。 |
RestorableOperationState |
可还原的长时间运行的作的类型。 |
函数
create |
创建可用于轮询长时间运行的作的轮询程序。 |
deserialize |
反序列化状态 |
函数详细信息
createHttpPoller<TResult, TState>(RunningOperation<unknown>, CreateHttpPollerOptions<TResult, TState>)
创建可用于轮询长时间运行的作的轮询程序。
function createHttpPoller<TResult, TState>(lro: RunningOperation<unknown>, options?: CreateHttpPollerOptions<TResult, TState>): PollerLike<TState, TResult>
参数
- lro
-
RunningOperation<unknown>
长时间运行的作的说明
- options
-
CreateHttpPollerOptions<TResult, TState>
用于配置轮询器的选项
返回
PollerLike<TState, TResult>
初始化的轮询器
deserializeState<TResult, TState>(string)
反序列化状态
function deserializeState<TResult, TState>(serializedState: string): RestorableOperationState<TResult, TState>
参数
- serializedState
-
string
返回
RestorableOperationState<TResult, TState>