-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
30 lines (27 loc) · 991 Bytes
/
index.d.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
29
30
export interface Options {
bee?: object;
job?: object;
pino?: object;
}
export class Service {
constructor(name: string, options?: object);
_name(): string;
_run(): Promise<any>;
}
export class Client {
constructor(options?: Options);
acceptService(service: string, options?: object): void;
acceptServices(services: string[], options?: object): void;
close(): Promise<any>;
health(service: string): Promise<any>;
job(service: string, id: number): Promise<any>;
forward(service: string, method: string, data: object, options?: object): Promise<any>;
send(service: string, method: string, data: object, options?: object): Promise<any>;
}
export class Server {
constructor(options?: Options);
addService(service: Service, concurrency?: number, options?: object): Promise<any>;
addServices(services: Service[], concurrency?: number, options?: object): Promise<any>;
close(): Promise<any>;
destroy(): Promise<any>;
}