mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
25 lines
532 B
TypeScript
25 lines
532 B
TypeScript
type VoidCallback = () => void;
|
|
type OnErrorCallback = (error: Error) => void;
|
|
|
|
export const enum RmqStatus {
|
|
DISCONNECTED = 'disconnected',
|
|
CONNECTED = 'connected',
|
|
}
|
|
|
|
export const enum RmqEventsMap {
|
|
ERROR = 'error',
|
|
DISCONNECT = 'disconnect',
|
|
CONNECT = 'connect',
|
|
}
|
|
|
|
/**
|
|
* RabbitMQ events map for the ampqlip client.
|
|
* Key is the event name and value is the corresponding callback function.
|
|
* @publicApi
|
|
*/
|
|
export type RmqEvents = {
|
|
error: OnErrorCallback;
|
|
disconnect: VoidCallback;
|
|
connect: VoidCallback;
|
|
};
|