1 | import { ConfigParams } from 'pip-services3-commons-node';
|
2 | import { IReconfigurable } from 'pip-services3-commons-node';
|
3 | import { ConnectionParams } from './ConnectionParams';
|
4 | import { IDiscovery } from './IDiscovery';
|
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 |
|
31 |
|
32 |
|
33 |
|
34 | export declare class MemoryDiscovery implements IDiscovery, IReconfigurable {
|
35 | private _items;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 | constructor(config?: ConfigParams);
|
42 | /**
|
43 | * Configures component by passing configuration parameters.
|
44 | *
|
45 | * @param config configuration parameters to be set.
|
46 | */
|
47 | configure(config: ConfigParams): void;
|
48 | /**
|
49 | * Reads connections from configuration parameters.
|
50 | * Each section represents an individual Connectionparams
|
51 | *
|
52 | * @param config configuration parameters to be read
|
53 | */
|
54 | readConnections(config: ConfigParams): void;
|
55 | /**
|
56 | * Registers connection parameters into the discovery service.
|
57 | *
|
58 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
59 | * @param key a key to uniquely identify the connection parameters.
|
60 | * @param credential a connection to be registered.
|
61 | * @param callback callback function that receives a registered connection or error.
|
62 | */
|
63 | register(correlationId: string, key: string, connection: ConnectionParams, callback: (err: any, result: ConnectionParams) => void): void;
|
64 | /**
|
65 | * Resolves a single connection parameters by its key.
|
66 | *
|
67 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
68 | * @param key a key to uniquely identify the connection.
|
69 | * @param callback callback function that receives found connection or error.
|
70 | */
|
71 | resolveOne(correlationId: string, key: string, callback: (err: any, result: ConnectionParams) => void): void;
|
72 | /**
|
73 | * Resolves all connection parameters by their key.
|
74 | *
|
75 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
76 | * @param key a key to uniquely identify the connections.
|
77 | * @param callback callback function that receives found connections or error.
|
78 | */
|
79 | resolveAll(correlationId: string, key: string, callback: (err: any, result: ConnectionParams[]) => void): void;
|
80 | }
|