1 | export interface TcpSubchannelAddress {
|
2 | port: number;
|
3 | host: string;
|
4 | }
|
5 | export interface IpcSubchannelAddress {
|
6 | path: string;
|
7 | }
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export type SubchannelAddress = TcpSubchannelAddress | IpcSubchannelAddress;
|
15 | export declare function isTcpSubchannelAddress(address: SubchannelAddress): address is TcpSubchannelAddress;
|
16 | export declare function subchannelAddressEqual(address1?: SubchannelAddress, address2?: SubchannelAddress): boolean;
|
17 | export declare function subchannelAddressToString(address: SubchannelAddress): string;
|
18 | export declare function stringToSubchannelAddress(addressString: string, port?: number): SubchannelAddress;
|
19 | export interface Endpoint {
|
20 | addresses: SubchannelAddress[];
|
21 | }
|
22 | export declare function endpointEqual(endpoint1: Endpoint, endpoint2: Endpoint): boolean;
|
23 | export declare function endpointToString(endpoint: Endpoint): string;
|
24 | export declare function endpointHasAddress(endpoint: Endpoint, expectedAddress: SubchannelAddress): boolean;
|
25 | export declare class EndpointMap<ValueType> {
|
26 | private map;
|
27 | get size(): number;
|
28 | getForSubchannelAddress(address: SubchannelAddress): ValueType | undefined;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | deleteMissing(endpoints: Endpoint[]): ValueType[];
|
34 | get(endpoint: Endpoint): ValueType | undefined;
|
35 | set(endpoint: Endpoint, mapEntry: ValueType): void;
|
36 | delete(endpoint: Endpoint): void;
|
37 | has(endpoint: Endpoint): boolean;
|
38 | clear(): void;
|
39 | keys(): IterableIterator<Endpoint>;
|
40 | values(): IterableIterator<ValueType>;
|
41 | entries(): IterableIterator<[Endpoint, ValueType]>;
|
42 | }
|