31 lines
589 B
TypeScript
31 lines
589 B
TypeScript
|
|
import type { IEndpointFS } from "$lib/server/broker-utils/FileSystem/endpoints/endpoints"
|
||
|
|
|
||
|
|
export class EndpointBrokerManager {
|
||
|
|
|
||
|
|
private static initialized = false
|
||
|
|
private static endpoints: Map<string, IEndpointFS>
|
||
|
|
private static lastNginxReload: Date = new Date()
|
||
|
|
|
||
|
|
public static get ready() {
|
||
|
|
return EndpointBrokerManager.initialized
|
||
|
|
}
|
||
|
|
|
||
|
|
public static init() {
|
||
|
|
// TODO: Read all files
|
||
|
|
|
||
|
|
// TODO: QUICK parse them
|
||
|
|
|
||
|
|
// TODO: Initialize a file watcher
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public async getEndpointByName(name: string): IEndpoint {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|