mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
21 lines
454 B
TypeScript
21 lines
454 B
TypeScript
import { ClientProxy } from './client/client-proxy';
|
|
import { Closeable } from './interfaces/closeable.interface';
|
|
|
|
export type CloseableClient = Closeable & ClientProxy;
|
|
|
|
export class ClientsContainer {
|
|
private clients: CloseableClient[] = [];
|
|
|
|
public getAllClients(): CloseableClient[] {
|
|
return this.clients;
|
|
}
|
|
|
|
public addClient(client: CloseableClient) {
|
|
this.clients.push(client);
|
|
}
|
|
|
|
public clear() {
|
|
this.clients = [];
|
|
}
|
|
}
|