Add enable global HTTP(s) agent support.
This commit is contained in:
Родитель
60ff33839b
Коммит
32e237e494
|
@ -1,6 +1,11 @@
|
|||
Note: This is an Azure Storage only package. The all up Azure node sdk still has the old storage bits in there. In a future release, those storage bits will be removed and an npm dependency to this storage node sdk will
|
||||
be taken. This is a GA release and the changes described below indicate the changes from the Azure node SDK 0.9.8 available here - https://github.com/Azure/azure-sdk-for-node.
|
||||
|
||||
2018.07 Version 2.10.1
|
||||
|
||||
ALL
|
||||
* Added a parameter `enableGlobalHttpAgent` to all services. To enable global HTTP(s) agent, please set `{blob|queue|table|file}Service.enableGlobalHttpAgent` to true.
|
||||
|
||||
2018.06 Version 2.10.0
|
||||
|
||||
ALL
|
||||
|
|
|
@ -636,6 +636,8 @@ StorageServiceClient.prototype._buildRequestOptions = function (webResource, bod
|
|||
delete webResource.headers[HeaderConstants.CONTENT_LENGTH];
|
||||
}
|
||||
|
||||
var enableGlobalHttpAgent = this.enableGlobalHttpAgent;
|
||||
|
||||
// Sets the request url in the web resource.
|
||||
this._setRequestUrl(webResource, options);
|
||||
|
||||
|
@ -666,7 +668,10 @@ StorageServiceClient.prototype._buildRequestOptions = function (webResource, bod
|
|||
requestOptions.timeout = Constants.DEFAULT_CLIENT_REQUEST_TIMEOUT_IN_MS; // 2 minutes
|
||||
}
|
||||
|
||||
requestOptions.forever = true;
|
||||
// If global HTTP agent is not enabled, use forever agent.
|
||||
if (enableGlobalHttpAgent !== true) {
|
||||
requestOptions.forever = true;
|
||||
}
|
||||
}
|
||||
|
||||
callback(error, requestOptions);
|
||||
|
|
|
@ -86,6 +86,8 @@ var StorageError = errors.StorageError;
|
|||
* the value specified by the singleBlobPutThresholdInBytes property in size.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Blob service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
|
|
@ -77,6 +77,8 @@ var ArgumentError = errors.ArgumentError;
|
|||
* parallelOperationThreadCount The number of parallel operations that may be performed when uploading a file.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the file service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
|
|
@ -55,6 +55,8 @@ var ServiceStatsParser = azureCommon.ServiceStatsParser;
|
|||
* defaultLocationMode The default location mode for requests made via the Queue service.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @augments {StorageServiceClient}
|
||||
*
|
||||
|
|
|
@ -61,6 +61,8 @@ var TableUtilities = require('./tableutilities');
|
|||
* defaultPayloadFormat The default payload format for requests made via the Table service.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Table service.; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
|
|
@ -86,6 +86,8 @@ declare module azurestorage {
|
|||
* the value specified by the singleBlobPutThresholdInBytes property in size.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Blob service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
@ -3240,6 +3242,8 @@ declare module azurestorage {
|
|||
* defaultLocationMode The default location mode for requests made via the Queue service.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* If no connection string or storageaccount and storageaccesskey are provided,
|
||||
* the AZURE_STORAGE_CONNECTION_STRING or AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used.
|
||||
* @augments {StorageServiceClient}
|
||||
|
@ -5513,6 +5517,8 @@ declare module azurestorage {
|
|||
* defaultPayloadFormat The default payload format for requests made via the Table service.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Table service.; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
@ -7654,6 +7660,8 @@ declare module azurestorage {
|
|||
* parallelOperationThreadCount The number of parallel operations that may be performed when uploading a file.
|
||||
* useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the file service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* enableGlobalHttpAgent Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @constructor
|
||||
* @extends {StorageServiceClient}
|
||||
*
|
||||
|
@ -9217,15 +9225,21 @@ declare module azurestorage {
|
|||
defaultClientRequestTimeoutInMs: number;
|
||||
/**
|
||||
* Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* Nagle algorithm; otherwise, false. The default value is false.
|
||||
* @member {bool} StorageServiceClient#useNagleAlgorithm
|
||||
*/
|
||||
useNagleAlgorithm: boolean;
|
||||
/**
|
||||
* Determines whether global HTTP(s) agent is enabled; true to use Global HTTP(s) agent; otherwise, false to use
|
||||
* http(s).Agent({keepAlive:true}).
|
||||
* @member {bool} StorageServiceClient#enableGlobalHttpAgent
|
||||
*/
|
||||
enableGlobalHttpAgent: boolean;
|
||||
/** The proxy object specified by caller.
|
||||
* @member {Proxy} StorageServiceClient#proxy
|
||||
*/
|
||||
proxy: Proxy;
|
||||
/** The logging settings object.
|
||||
/** The logging settings object.
|
||||
* @member {diagnostics.logger.Logger} StorageServiceClient#logger
|
||||
*/
|
||||
logger: diagnostics.logger.Logger;
|
||||
|
|
Загрузка…
Ссылка в новой задаче