mirror of
https://github.com/Teamlinker/Teamlinker.git
synced 2025-06-03 03:00:17 +00:00
12 lines
303 B
TypeScript
12 lines
303 B
TypeScript
import * as amqpLib from "amqplib"
|
|
|
|
export class BaseMq {
|
|
private static conn:amqpLib.Connection
|
|
static async initChannel (uri) {
|
|
BaseMq.conn=await amqpLib.connect(uri)
|
|
}
|
|
async createChannel() {
|
|
let channel=await BaseMq.conn.createChannel()
|
|
return channel
|
|
}
|
|
} |