Skip to content

Commit d709e50

Browse files
authored
feat: node-http-handler set default keep-alive to true (#307)
1 parent d8499db commit d709e50

File tree

20 files changed

+176
-28
lines changed

20 files changed

+176
-28
lines changed

packages/client-codecommit-node/CodeCommitConfiguration.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export interface CodeCommitConfiguration {
6767
*/
6868
httpHandler?: __aws_sdk_types.HttpHandler<_stream.Readable>;
6969

70+
/**
71+
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
72+
*/
73+
keepAlive?: boolean;
74+
7075
/**
7176
* The maximum number of redirects to follow for a service request. Set to `0` to disable retries.
7277
*/
@@ -182,6 +187,8 @@ export interface CodeCommitResolvedConfiguration
182187

183188
httpHandler: __aws_sdk_types.HttpHandler<_stream.Readable>;
184189

190+
keepAlive: boolean;
191+
185192
maxRedirects: number;
186193

187194
maxRetries: number;
@@ -335,12 +342,16 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
335342
configuration.utf8Encoder
336343
)
337344
},
345+
keepAlive: {
346+
defaultValue: true
347+
},
338348
_user_injected_http_handler: {
339349
defaultProvider: (configuration: { httpHandler?: any }) =>
340350
!configuration.httpHandler
341351
},
342352
httpHandler: {
343-
defaultProvider: () => new __aws_sdk_node_http_handler.NodeHttpHandler()
353+
defaultProvider: (configuration: { keepAlive: boolean }) =>
354+
new __aws_sdk_node_http_handler.NodeHttpHandler(configuration)
344355
},
345356
handler: {
346357
defaultProvider: (configuration: {

packages/client-codecommit-node/model/ServiceMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export const ServiceMetadata: _ServiceMetadata_ = {
1212
targetPrefix: "CodeCommit_20150413",
1313
uid: "codecommit-2015-04-13"
1414
};
15-
export const clientVersion: string = "0.1.0-preview.4";
15+
export const clientVersion: string = "0.1.0-preview.5";

packages/client-dynamodb-node/DynamoDBConfiguration.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export interface DynamoDBConfiguration {
6767
*/
6868
httpHandler?: __aws_sdk_types.HttpHandler<_stream.Readable>;
6969

70+
/**
71+
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
72+
*/
73+
keepAlive?: boolean;
74+
7075
/**
7176
* The maximum number of redirects to follow for a service request. Set to `0` to disable retries.
7277
*/
@@ -181,6 +186,8 @@ export interface DynamoDBResolvedConfiguration
181186

182187
httpHandler: __aws_sdk_types.HttpHandler<_stream.Readable>;
183188

189+
keepAlive: boolean;
190+
184191
maxRedirects: number;
185192

186193
maxRetries: number;
@@ -334,12 +341,16 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
334341
configuration.utf8Encoder
335342
)
336343
},
344+
keepAlive: {
345+
defaultValue: true
346+
},
337347
_user_injected_http_handler: {
338348
defaultProvider: (configuration: { httpHandler?: any }) =>
339349
!configuration.httpHandler
340350
},
341351
httpHandler: {
342-
defaultProvider: () => new __aws_sdk_node_http_handler.NodeHttpHandler()
352+
defaultProvider: (configuration: { keepAlive: boolean }) =>
353+
new __aws_sdk_node_http_handler.NodeHttpHandler(configuration)
343354
},
344355
handler: {
345356
defaultProvider: (configuration: {

packages/client-dynamodb-node/model/ServiceMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export const ServiceMetadata: _ServiceMetadata_ = {
1212
targetPrefix: "DynamoDB_20120810",
1313
uid: "dynamodb-2012-08-10"
1414
};
15-
export const clientVersion: string = "0.1.0-preview.3";
15+
export const clientVersion: string = "0.1.0-preview.4";

packages/client-glacier-node/GlacierConfiguration.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export interface GlacierConfiguration {
6767
*/
6868
httpHandler?: __aws_sdk_types.HttpHandler<_stream.Readable>;
6969

70+
/**
71+
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
72+
*/
73+
keepAlive?: boolean;
74+
7075
/**
7176
* The maximum number of redirects to follow for a service request. Set to `0` to disable retries.
7277
*/
@@ -181,6 +186,8 @@ export interface GlacierResolvedConfiguration
181186

182187
httpHandler: __aws_sdk_types.HttpHandler<_stream.Readable>;
183188

189+
keepAlive: boolean;
190+
184191
maxRedirects: number;
185192

186193
maxRetries: number;
@@ -337,12 +344,16 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
337344
configuration.base64Decoder
338345
)
339346
},
347+
keepAlive: {
348+
defaultValue: true
349+
},
340350
_user_injected_http_handler: {
341351
defaultProvider: (configuration: { httpHandler?: any }) =>
342352
!configuration.httpHandler
343353
},
344354
httpHandler: {
345-
defaultProvider: () => new __aws_sdk_node_http_handler.NodeHttpHandler()
355+
defaultProvider: (configuration: { keepAlive: boolean }) =>
356+
new __aws_sdk_node_http_handler.NodeHttpHandler(configuration)
346357
},
347358
handler: {
348359
defaultProvider: (configuration: {

packages/client-glacier-node/model/ServiceMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export const ServiceMetadata: _ServiceMetadata_ = {
99
signatureVersion: "v4",
1010
uid: "glacier-2012-06-01"
1111
};
12-
export const clientVersion: string = "0.1.0-preview.5";
12+
export const clientVersion: string = "0.1.0-preview.6";

packages/client-kms-node/KMSConfiguration.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export interface KMSConfiguration {
6767
*/
6868
httpHandler?: __aws_sdk_types.HttpHandler<_stream.Readable>;
6969

70+
/**
71+
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
72+
*/
73+
keepAlive?: boolean;
74+
7075
/**
7176
* The maximum number of redirects to follow for a service request. Set to `0` to disable retries.
7277
*/
@@ -181,6 +186,8 @@ export interface KMSResolvedConfiguration
181186

182187
httpHandler: __aws_sdk_types.HttpHandler<_stream.Readable>;
183188

189+
keepAlive: boolean;
190+
184191
maxRedirects: number;
185192

186193
maxRetries: number;
@@ -334,12 +341,16 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
334341
configuration.utf8Encoder
335342
)
336343
},
344+
keepAlive: {
345+
defaultValue: true
346+
},
337347
_user_injected_http_handler: {
338348
defaultProvider: (configuration: { httpHandler?: any }) =>
339349
!configuration.httpHandler
340350
},
341351
httpHandler: {
342-
defaultProvider: () => new __aws_sdk_node_http_handler.NodeHttpHandler()
352+
defaultProvider: (configuration: { keepAlive: boolean }) =>
353+
new __aws_sdk_node_http_handler.NodeHttpHandler(configuration)
343354
},
344355
handler: {
345356
defaultProvider: (configuration: {

packages/client-kms-node/model/ServiceMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export const ServiceMetadata: _ServiceMetadata_ = {
1212
targetPrefix: "TrentService",
1313
uid: "kms-2014-11-01"
1414
};
15-
export const clientVersion: string = "0.1.0-preview.3";
15+
export const clientVersion: string = "0.1.0-preview.4";

packages/client-lambda-node/LambdaConfiguration.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export interface LambdaConfiguration {
6767
*/
6868
httpHandler?: __aws_sdk_types.HttpHandler<_stream.Readable>;
6969

70+
/**
71+
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
72+
*/
73+
keepAlive?: boolean;
74+
7075
/**
7176
* The maximum number of redirects to follow for a service request. Set to `0` to disable retries.
7277
*/
@@ -181,6 +186,8 @@ export interface LambdaResolvedConfiguration
181186

182187
httpHandler: __aws_sdk_types.HttpHandler<_stream.Readable>;
183188

189+
keepAlive: boolean;
190+
184191
maxRedirects: number;
185192

186193
maxRetries: number;
@@ -337,12 +344,16 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
337344
configuration.base64Decoder
338345
)
339346
},
347+
keepAlive: {
348+
defaultValue: true
349+
},
340350
_user_injected_http_handler: {
341351
defaultProvider: (configuration: { httpHandler?: any }) =>
342352
!configuration.httpHandler
343353
},
344354
httpHandler: {
345-
defaultProvider: () => new __aws_sdk_node_http_handler.NodeHttpHandler()
355+
defaultProvider: (configuration: { keepAlive: boolean }) =>
356+
new __aws_sdk_node_http_handler.NodeHttpHandler(configuration)
346357
},
347358
handler: {
348359
defaultProvider: (configuration: {

packages/client-lambda-node/model/ServiceMetadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export const ServiceMetadata: _ServiceMetadata_ = {
99
signatureVersion: "v4",
1010
uid: "lambda-2015-03-31"
1111
};
12-
export const clientVersion: string = "0.1.0-preview.5";
12+
export const clientVersion: string = "0.1.0-preview.6";

0 commit comments

Comments
 (0)