UNPKG

696 BTypeScriptView Raw
1/// <reference types="node" />
2import { Socket } from 'net';
3import * as tls from 'tls';
4import { SubchannelAddress } from './subchannel-address';
5import { ChannelOptions } from './channel-options';
6import { GrpcUri } from './uri-parser';
7export interface ProxyMapResult {
8 target: GrpcUri;
9 extraOptions: ChannelOptions;
10}
11export declare function mapProxyName(target: GrpcUri, options: ChannelOptions): ProxyMapResult;
12export interface ProxyConnectionResult {
13 socket?: Socket;
14 realTarget?: GrpcUri;
15}
16export declare function getProxiedConnection(address: SubchannelAddress, channelOptions: ChannelOptions, connectionOptions: tls.ConnectionOptions): Promise<ProxyConnectionResult>;