Browse Source

Make RadiusServer singleton

master
Garrett Mills 3 months ago
parent
commit
05278bda0c
  1. 13
      src/radius/RadiusServer.ts

13
src/radius/RadiusServer.ts

@ -6,8 +6,21 @@ import { RadiusService } from './RadiusService';
const packageInterface = PackageInterface.get();
export class RadiusServer {
private static instance?: RadiusServer;
public static get(): RadiusServer {
if (!this.instance) {
this.instance = new this();
}
return this.instance;
}
private server?: UDPServer;
// eslint-disable-next-line @typescript-eslint/no-empty-function
private constructor() {}
public async up(): Promise<void> {
const config = packageInterface.getConfig();
const AuthMechanismus = (await import(`../auth/${config.authentication}`))[

Loading…
Cancel
Save