dt-common-device
Version:
A secure and robust device management library for IoT applications
26 lines (25 loc) • 879 B
TypeScript
import { InternalEventSubscription } from "../events";
import { IConfig } from "./config.types";
export declare function initialize(cfg: IConfig): Promise<void>;
export declare function getConfig(): IConfig;
export declare function getEventSubscription(): InternalEventSubscription | null;
export declare function checkRequiredEnv(): void;
export declare function ensureAuditInitialized(): void;
/**
* Returns the PostgreSQL DB URI from environment variables.
* Throws an error if not set.
*/
export declare function getPostgresDbUri(): string;
export declare function getMongoUri(): string;
/**
* Returns the Redis DB Host and port from environment variables.
* Throws an error if not set.
*/
export declare function getRedisDbHostAndPort(): {
host: string;
port: number;
};
/**
* Graceful shutdown function
*/
export declare function shutdown(): Promise<void>;