@addapptables/microservice
Version:
addapptables microservice
26 lines (25 loc) • 921 B
TypeScript
import { Class } from '../types';
import { IBusAdapter, IEvent, IEventDto } from '../interfaces';
export interface IManagerAdapterBusWithConfig<T = any> {
withConfig(config: T): IManagerAdapterBusBuild;
build(): IAdapterBusConfig;
}
export interface IAdapterBusSagaConfig<T = any> {
config: T;
events: Class<IEvent<IEventDto>>[];
}
export interface IAdapterBusConfig<T = any> {
adapterPrototype: Class<IBusAdapter>;
adapterConfig: T;
}
export interface IManagerAdapterBusBuild {
build(): IAdapterBusConfig;
}
export declare class ManagerAdapterBus<T = any> implements IManagerAdapterBusWithConfig<T>, IManagerAdapterBusBuild {
private readonly prototype;
private adapterConfig;
private constructor();
static getInstance<T = any>(prototype: Class<IBusAdapter>): IManagerAdapterBusWithConfig;
withConfig(config: T): IManagerAdapterBusBuild;
build(): IAdapterBusConfig;
}