UNPKG

3.25 kBTypeScriptView Raw
1import { CompressionAlgorithms } from './compression-algorithms';
2/**
3 * An interface that contains options used when initializing a Channel instance.
4 */
5export interface ChannelOptions {
6 'grpc.ssl_target_name_override'?: string;
7 'grpc.primary_user_agent'?: string;
8 'grpc.secondary_user_agent'?: string;
9 'grpc.default_authority'?: string;
10 'grpc.keepalive_time_ms'?: number;
11 'grpc.keepalive_timeout_ms'?: number;
12 'grpc.keepalive_permit_without_calls'?: number;
13 'grpc.service_config'?: string;
14 'grpc.max_concurrent_streams'?: number;
15 'grpc.initial_reconnect_backoff_ms'?: number;
16 'grpc.max_reconnect_backoff_ms'?: number;
17 'grpc.use_local_subchannel_pool'?: number;
18 'grpc.max_send_message_length'?: number;
19 'grpc.max_receive_message_length'?: number;
20 'grpc.enable_http_proxy'?: number;
21 'grpc.http_connect_target'?: string;
22 'grpc.http_connect_creds'?: string;
23 'grpc.default_compression_algorithm'?: CompressionAlgorithms;
24 'grpc.enable_channelz'?: number;
25 'grpc.dns_min_time_between_resolutions_ms'?: number;
26 'grpc.enable_retries'?: number;
27 'grpc.per_rpc_retry_buffer_size'?: number;
28 'grpc.retry_buffer_size'?: number;
29 'grpc.max_connection_age_ms'?: number;
30 'grpc.max_connection_age_grace_ms'?: number;
31 'grpc.max_connection_idle_ms'?: number;
32 'grpc-node.max_session_memory'?: number;
33 'grpc.service_config_disable_resolution'?: number;
34 'grpc.client_idle_timeout_ms'?: number;
35 /**
36 * Set the enableTrace option in TLS clients and servers
37 */
38 'grpc-node.tls_enable_trace'?: number;
39 'grpc.lb.ring_hash.ring_size_cap'?: number;
40 'grpc-node.retry_max_attempts_limit'?: number;
41 [key: string]: any;
42}
43/**
44 * This is for checking provided options at runtime. This is an object for
45 * easier membership checking.
46 */
47export declare const recognizedOptions: {
48 'grpc.ssl_target_name_override': boolean;
49 'grpc.primary_user_agent': boolean;
50 'grpc.secondary_user_agent': boolean;
51 'grpc.default_authority': boolean;
52 'grpc.keepalive_time_ms': boolean;
53 'grpc.keepalive_timeout_ms': boolean;
54 'grpc.keepalive_permit_without_calls': boolean;
55 'grpc.service_config': boolean;
56 'grpc.max_concurrent_streams': boolean;
57 'grpc.initial_reconnect_backoff_ms': boolean;
58 'grpc.max_reconnect_backoff_ms': boolean;
59 'grpc.use_local_subchannel_pool': boolean;
60 'grpc.max_send_message_length': boolean;
61 'grpc.max_receive_message_length': boolean;
62 'grpc.enable_http_proxy': boolean;
63 'grpc.enable_channelz': boolean;
64 'grpc.dns_min_time_between_resolutions_ms': boolean;
65 'grpc.enable_retries': boolean;
66 'grpc.per_rpc_retry_buffer_size': boolean;
67 'grpc.retry_buffer_size': boolean;
68 'grpc.max_connection_age_ms': boolean;
69 'grpc.max_connection_age_grace_ms': boolean;
70 'grpc-node.max_session_memory': boolean;
71 'grpc.service_config_disable_resolution': boolean;
72 'grpc.client_idle_timeout_ms': boolean;
73 'grpc-node.tls_enable_trace': boolean;
74 'grpc.lb.ring_hash.ring_size_cap': boolean;
75 'grpc-node.retry_max_attempts_limit': boolean;
76};
77export declare function channelOptionsEqual(options1: ChannelOptions, options2: ChannelOptions): boolean;