File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ declare module "agentkeepalive" {
2+ import * as http from 'http' ;
3+ import * as https from 'https' ;
4+
5+ interface AgentStatus {
6+ createSocketCount : number ,
7+ createSocketErrorCount : number ,
8+ closeSocketCount : number ,
9+ errorSocketCount : number ,
10+ timeoutSocketCount : number ,
11+ requestCount : number ,
12+ freeSockets : object ,
13+ sockets : object ,
14+ requests : object ,
15+ }
16+
17+ interface HttpOptions extends http . AgentOptions {
18+ freeSocketKeepAliveTimeout ?: number ;
19+ timeout ?: number ;
20+ socketActiveTTL ?: number ;
21+ }
22+
23+ interface HttpsOptions extends https . AgentOptions {
24+ freeSocketKeepAliveTimeout ?: number ;
25+ timeout ?: number ;
26+ socketActiveTTL ?: number ;
27+ }
28+
29+ class internal extends http . Agent {
30+ constructor ( opts ?: HttpOptions ) ;
31+ readonly statusChanged : boolean ;
32+ createSocket ( req : http . IncomingMessage , options : http . RequestOptions , cb : Function ) : void ;
33+ getCurrentStatus ( ) : AgentStatus ;
34+ }
35+
36+ namespace internal {
37+ export class HttpsAgent extends internal {
38+ constructor ( opts ?: HttpsOptions ) ;
39+ }
40+ }
41+
42+ export = internal ;
43+ }
You can’t perform that action at this time.
0 commit comments