import type { LoggerSettings } from './loggerSettings'; import type { MetricsRecorderSettings } from './metricsRecorderSettings'; interface PluginsRegistry { logger: LoggerSettings; metricsRecorder: MetricsRecorderSettings; } /** * Registers a plugin under a namespace. * @param namespace the namespace to register the plugin * @param pluginSetting the setting object of the plugin to register * * @example * // example of a registration and usage of metricsRecorder plugin * registerPlugin('metricsRecorder', { * provider: () => ({ * // record and console log all metrics * record: (metric) => { * console.log(metric); * }, * }), * }); */ export declare function registerPlugin(namespace: Namespace, pluginSetting: PluginSetting): void; /** * Returns the plugin of the given namespace. * @param namespace the namespace of the plugin to retrieve * @returns the plugin matching the given namespace * * @example * // example of getting metricsRecorder plugin * const metricsRecorder = getPlugin('metricsRecorder'); * * metricsRecorder?.record({ * metricName: 'test', * metricValue: 123 * }); */ export declare function getPlugin(namespace: Namespace): ReturnType; export {}; //# sourceMappingURL=pluginsRegistry.d.ts.map