WIP: initial prototype

- Added client.close API
- Added resurrect event
- Improved resurrect ping strategy
- Updated types
This commit is contained in:
delvedor
2018-12-10 20:12:25 +01:00
parent 4c8df2d4c0
commit a9e621721e
6 changed files with 39 additions and 10 deletions

2
lib/Connection.d.ts vendored
View File

@ -46,7 +46,7 @@ export default class Connection {
_status: string;
_agent: http.Agent;
constructor(opts?: ConnectionOptions);
request(params: any, callback: (err: Error | null, response: http.IncomingMessage | null) => void): http.ClientRequest;
request(params: http.ClientRequestArgs, callback: (err: Error | null, response: http.IncomingMessage | null) => void): http.ClientRequest;
close(): Connection;
setRole(role: string, enabled: boolean): Connection;
status: string;