StorageRetryOptions interface
存储 Blob 重试选项接口。
属性
max |
Optional. 指定重试作之前允许的最大延迟(默认值为 120s 或 120 * 1000ms)。 如果指定 0,则还必须为 retryDelayInMs 指定 0。 |
max |
Optional. 最大尝试次数,默认值为 4。 值为 1 表示 1 次尝试,不重试。 小于 1 的值表示默认重试次数。 |
retry |
Optional. 指定重试作前要使用的延迟量(默认值为 4s 或 4 * 1000ms)。 延迟增加(指数级或线性),每次重试最多由 maxRetryDelayInMs 指定的最大值。 如果指定 0,则还必须为 maxRetryDelayInMs 指定 0。 |
retry |
Optional. StorageRetryPolicyType,默认值为指数重试策略。 |
secondary |
如果指定了 secondaryHost,则会针对此主机尝试重试。 如果 secondaryHost 未定义(默认值),则不会针对另一台主机重试作。 注意:在设置此字段之前,请确保了解在 https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs 读取过时和可能不一致的数据的问题 |
try |
Optional. 指示任意一次尝试 HTTP 请求所允许的最大时间(以毫秒为单位)。 值为零或未定义意味着 SDK 客户端上没有默认超时,将使用 Azure 存储服务器的默认超时策略。 请参阅 https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations |
属性详细信息
maxRetryDelayInMs
Optional. 指定重试作之前允许的最大延迟(默认值为 120s 或 120 * 1000ms)。 如果指定 0,则还必须为 retryDelayInMs 指定 0。
maxRetryDelayInMs?: number
属性值
number
maxTries
Optional. 最大尝试次数,默认值为 4。 值为 1 表示 1 次尝试,不重试。 小于 1 的值表示默认重试次数。
maxTries?: number
属性值
number
retryDelayInMs
Optional. 指定重试作前要使用的延迟量(默认值为 4s 或 4 * 1000ms)。 延迟增加(指数级或线性),每次重试最多由 maxRetryDelayInMs 指定的最大值。 如果指定 0,则还必须为 maxRetryDelayInMs 指定 0。
retryDelayInMs?: number
属性值
number
retryPolicyType
Optional. StorageRetryPolicyType,默认值为指数重试策略。
retryPolicyType?: StorageRetryPolicyType
属性值
secondaryHost
如果指定了 secondaryHost,则会针对此主机尝试重试。 如果 secondaryHost 未定义(默认值),则不会针对另一台主机重试作。
注意:在设置此字段之前,请确保了解在 https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs 读取过时和可能不一致的数据的问题
secondaryHost?: string
属性值
string
tryTimeoutInMs
Optional. 指示任意一次尝试 HTTP 请求所允许的最大时间(以毫秒为单位)。 值为零或未定义意味着 SDK 客户端上没有默认超时,将使用 Azure 存储服务器的默认超时策略。
请参阅 https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations
tryTimeoutInMs?: number
属性值
number