@dudousxd/nestjs-diagnostics
Version:
A standard convention for @dudousxd/nestjs-* libs to emit observability events over node:diagnostics_channel.
13 lines • 807 B
TypeScript
/**
* Which half of a split deployment this process is:
*
* - `'all'` (default): emit, forward, consume and run listeners. One process does everything.
* - `'api'`: emit and forward through the selected transport, and hand listener work to it;
* never consume what other processes forward, never run a listener.
* - `'worker'`: consume and run listeners. Diagnostics mounts no HTTP surface, so a worker does
* everything `'all'` does; the role exists so one setting drives every library of the app.
*/
export type DiagnosticsRole = 'all' | 'api' | 'worker';
/** Validate `role` (default `'all'`) and refuse combinations that cannot work. */
export declare function resolveRole(role: DiagnosticsRole | undefined, transport: string | undefined): DiagnosticsRole;
//# sourceMappingURL=role.d.ts.map