import { ChannelCredentials , Client , Metadata , requestCallback , ClientWritableStream , ClientReadableStream , ClientDuplexStream , Channel } from "grpc" ; import EnvoyContext from "./envoy-context" ; import { EnvoyGrpcRequestInit } from "./envoy-grpc-request-params" ; /**
 * the HTTP header signature
 */ export interface HttpHeader { [ s ] : string | string [ ] ; } /**
 * original constructor of gRPC
 */ export type ClientConstructor = new ( address , credentials , options ? ) => Client ; param request param options export type RequestFunc = ( request : any , options ? : EnvoyGrpcRequestInit ) => Promise < any > ; export type ClientStreamFunc = ( callback : requestCallback < any > , options ? : EnvoyGrpcRequestInit ) => ClientWritableStream < any > ; export type ServerStreamFunc = ( request : any , options ? : EnvoyGrpcRequestInit ) => ClientReadableStream < any > ; export type BidiStreamFunc = ( options ? : EnvoyGrpcRequestInit ) => ClientDuplexStream < any , any > ; export interface EnvoyClientFuncEnabled { /**
     * the API signature, dynamic attached for each gRPC request
     */ [ methodName ] : RequestFunc | ClientStreamFunc | ServerStreamFunc | BidiStreamFunc | any ; } /**
 * the envoy client for gRPC
 */ export interface EnvoyClient extends Client , EnvoyClientFuncEnabled { /**
     * the original target remote address (hostname:port)
     */ readonly originalAddress : string ; /**
     * the envoy context of this client
     */ readonly envoyContext : EnvoyContext ; } param address param ctx export type EnvoyClientConstructor < T extends EnvoyClient > = new ( address , ctx ) => T ; export type ChannelFactoryOverride = ( target : string , credentials : ChannelCredentials , options : { [ key ] : string | number ; } ) => Channel ;