-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinterface.ts
28 lines (26 loc) · 1.32 KB
/
interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
type singletonMapInterface = {} | (ClientMap & {Logger: LoggerInterface});
type DependencyConstantType = import('./schema/service_dependency_interface/dependency_constants').DependencyType;
type LoggerInterface = import('./logging/interface').LoggerInterface;
type transactionContextInterface = {
addTransactionDataToLog: Function,
patchBluebird: Function,
getExpressMiddleware: Function,
getTrxnId: Function
}
export interface RpcFrameworkInterface {
initService(): any;
getService(): any;
addToSingleton(key: string, value: any): singletonMapInterface;
getSingleton(): singletonMapInterface;
initWorkflow(): any;
getDependencyConfig(): DependencyConstantType;
createClient(service_id: string, called_service_id: string, schema: object, server_host: string, server_port: number, client_options: any): object;
createExternalClient(service_id: string, external_service_id: string, config: ClientMap): any;
createServer(service_id: string, auth_service_ids: string[], schema: object, service: object, port: number): void;
initConfig(service_id: string, options?: ClientMap): ClientMap;
initCredentials(service_id: string): ClientMap;
initLogger(options: ClientMap | string): object;
addObjToSingleton(obj: object): any;
initTransactionContext(params: any): transactionContextInterface;
getGatewayConstants(): any;
}