mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #21542 from weeco/amqplib-connection-object-fix
Accept a connection object instead of a URL
This commit is contained in:
Vendored
+1
-1
@@ -63,4 +63,4 @@ export interface ConfirmChannel extends Channel {
|
||||
waitForConfirms(): Promise<void>;
|
||||
}
|
||||
|
||||
export function connect(url: string, socketOptions?: any): Promise<Connection>;
|
||||
export function connect(url: string | Options.Connect, socketOptions?: any): Promise<Connection>;
|
||||
|
||||
Vendored
+59
-1
@@ -21,6 +21,64 @@ export namespace Replies {
|
||||
}
|
||||
|
||||
export namespace Options {
|
||||
interface Connect {
|
||||
/**
|
||||
* The to be used protocol
|
||||
*
|
||||
* Default value: 'amqp'
|
||||
*/
|
||||
protocol?: string;
|
||||
/**
|
||||
* Hostname used for connecting to the server.
|
||||
*
|
||||
* Default value: 'localhost'
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
* Port used for connecting to the server.
|
||||
*
|
||||
* Default value: 5672
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* Username used for authenticating against the server.
|
||||
*
|
||||
* Default value: 'guest'
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* Password used for authenticating against the server.
|
||||
*
|
||||
* Default value: 'guest'
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* The desired locale for error messages. RabbitMQ only ever uses en_US
|
||||
*
|
||||
* Default value: 'en_US'
|
||||
*/
|
||||
locale?: string;
|
||||
/**
|
||||
* The size in bytes of the maximum frame allowed over the connection. 0 means
|
||||
* no limit (but since frames have a size field which is an unsigned 32 bit integer, it’s perforce 2^32 - 1).
|
||||
*
|
||||
* Default value: 0x1000 (4kb) - That's the allowed minimum, it will fit many purposes
|
||||
*/
|
||||
frameMax?: number;
|
||||
/**
|
||||
* The period of the connection heartbeat in seconds.
|
||||
*
|
||||
* Default value: 0
|
||||
*/
|
||||
heartbeat?: number;
|
||||
/**
|
||||
* What VHost shall be used.
|
||||
*
|
||||
* Default value: '/'
|
||||
*/
|
||||
vhost?: string;
|
||||
}
|
||||
|
||||
interface AssertQueue {
|
||||
exclusive?: boolean;
|
||||
durable?: boolean;
|
||||
@@ -85,4 +143,4 @@ export interface Message {
|
||||
content: Buffer;
|
||||
fields: any;
|
||||
properties: any;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user