1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | Object.defineProperty(exports, "__esModule", { value: true });
|
19 | exports.experimental = exports.addAdminServicesToServer = exports.getChannelzHandlers = exports.getChannelzServiceDefinition = exports.InterceptorConfigurationError = exports.InterceptingCall = exports.RequesterBuilder = exports.ListenerBuilder = exports.StatusBuilder = exports.getClientChannel = exports.ServerCredentials = exports.Server = exports.setLogVerbosity = exports.setLogger = exports.load = exports.loadObject = exports.CallCredentials = exports.ChannelCredentials = exports.waitForClientReady = exports.closeClient = exports.Channel = exports.makeGenericClientConstructor = exports.makeClientConstructor = exports.loadPackageDefinition = exports.Client = exports.compressionAlgorithms = exports.propagate = exports.connectivityState = exports.status = exports.logVerbosity = exports.Metadata = exports.credentials = void 0;
|
20 | const call_credentials_1 = require("./call-credentials");
|
21 | Object.defineProperty(exports, "CallCredentials", { enumerable: true, get: function () { return call_credentials_1.CallCredentials; } });
|
22 | const channel_1 = require("./channel");
|
23 | Object.defineProperty(exports, "Channel", { enumerable: true, get: function () { return channel_1.ChannelImplementation; } });
|
24 | const compression_algorithms_1 = require("./compression-algorithms");
|
25 | Object.defineProperty(exports, "compressionAlgorithms", { enumerable: true, get: function () { return compression_algorithms_1.CompressionAlgorithms; } });
|
26 | const connectivity_state_1 = require("./connectivity-state");
|
27 | Object.defineProperty(exports, "connectivityState", { enumerable: true, get: function () { return connectivity_state_1.ConnectivityState; } });
|
28 | const channel_credentials_1 = require("./channel-credentials");
|
29 | Object.defineProperty(exports, "ChannelCredentials", { enumerable: true, get: function () { return channel_credentials_1.ChannelCredentials; } });
|
30 | const client_1 = require("./client");
|
31 | Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
|
32 | const constants_1 = require("./constants");
|
33 | Object.defineProperty(exports, "logVerbosity", { enumerable: true, get: function () { return constants_1.LogVerbosity; } });
|
34 | Object.defineProperty(exports, "status", { enumerable: true, get: function () { return constants_1.Status; } });
|
35 | Object.defineProperty(exports, "propagate", { enumerable: true, get: function () { return constants_1.Propagate; } });
|
36 | const logging = require("./logging");
|
37 | const make_client_1 = require("./make-client");
|
38 | Object.defineProperty(exports, "loadPackageDefinition", { enumerable: true, get: function () { return make_client_1.loadPackageDefinition; } });
|
39 | Object.defineProperty(exports, "makeClientConstructor", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } });
|
40 | Object.defineProperty(exports, "makeGenericClientConstructor", { enumerable: true, get: function () { return make_client_1.makeClientConstructor; } });
|
41 | const metadata_1 = require("./metadata");
|
42 | Object.defineProperty(exports, "Metadata", { enumerable: true, get: function () { return metadata_1.Metadata; } });
|
43 | const server_1 = require("./server");
|
44 | Object.defineProperty(exports, "Server", { enumerable: true, get: function () { return server_1.Server; } });
|
45 | const server_credentials_1 = require("./server-credentials");
|
46 | Object.defineProperty(exports, "ServerCredentials", { enumerable: true, get: function () { return server_credentials_1.ServerCredentials; } });
|
47 | const status_builder_1 = require("./status-builder");
|
48 | Object.defineProperty(exports, "StatusBuilder", { enumerable: true, get: function () { return status_builder_1.StatusBuilder; } });
|
49 |
|
50 |
|
51 | exports.credentials = {
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | combineChannelCredentials: (channelCredentials, ...callCredentials) => {
|
60 | return callCredentials.reduce((acc, other) => acc.compose(other), channelCredentials);
|
61 | },
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | combineCallCredentials: (first, ...additional) => {
|
70 | return additional.reduce((acc, other) => acc.compose(other), first);
|
71 | },
|
72 |
|
73 | createInsecure: channel_credentials_1.ChannelCredentials.createInsecure,
|
74 | createSsl: channel_credentials_1.ChannelCredentials.createSsl,
|
75 | createFromSecureContext: channel_credentials_1.ChannelCredentials.createFromSecureContext,
|
76 |
|
77 | createFromMetadataGenerator: call_credentials_1.CallCredentials.createFromMetadataGenerator,
|
78 | createFromGoogleCredential: call_credentials_1.CallCredentials.createFromGoogleCredential,
|
79 | createEmpty: call_credentials_1.CallCredentials.createEmpty,
|
80 | };
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | const closeClient = (client) => client.close();
|
86 | exports.closeClient = closeClient;
|
87 | const waitForClientReady = (client, deadline, callback) => client.waitForReady(deadline, callback);
|
88 | exports.waitForClientReady = waitForClientReady;
|
89 |
|
90 |
|
91 |
|
92 | const loadObject = (value, options) => {
|
93 | throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');
|
94 | };
|
95 | exports.loadObject = loadObject;
|
96 | const load = (filename, format, options) => {
|
97 | throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');
|
98 | };
|
99 | exports.load = load;
|
100 | const setLogger = (logger) => {
|
101 | logging.setLogger(logger);
|
102 | };
|
103 | exports.setLogger = setLogger;
|
104 | const setLogVerbosity = (verbosity) => {
|
105 | logging.setLoggerVerbosity(verbosity);
|
106 | };
|
107 | exports.setLogVerbosity = setLogVerbosity;
|
108 | const getClientChannel = (client) => {
|
109 | return client_1.Client.prototype.getChannel.call(client);
|
110 | };
|
111 | exports.getClientChannel = getClientChannel;
|
112 | var client_interceptors_1 = require("./client-interceptors");
|
113 | Object.defineProperty(exports, "ListenerBuilder", { enumerable: true, get: function () { return client_interceptors_1.ListenerBuilder; } });
|
114 | Object.defineProperty(exports, "RequesterBuilder", { enumerable: true, get: function () { return client_interceptors_1.RequesterBuilder; } });
|
115 | Object.defineProperty(exports, "InterceptingCall", { enumerable: true, get: function () { return client_interceptors_1.InterceptingCall; } });
|
116 | Object.defineProperty(exports, "InterceptorConfigurationError", { enumerable: true, get: function () { return client_interceptors_1.InterceptorConfigurationError; } });
|
117 | var channelz_1 = require("./channelz");
|
118 | Object.defineProperty(exports, "getChannelzServiceDefinition", { enumerable: true, get: function () { return channelz_1.getChannelzServiceDefinition; } });
|
119 | Object.defineProperty(exports, "getChannelzHandlers", { enumerable: true, get: function () { return channelz_1.getChannelzHandlers; } });
|
120 | var admin_1 = require("./admin");
|
121 | Object.defineProperty(exports, "addAdminServicesToServer", { enumerable: true, get: function () { return admin_1.addAdminServicesToServer; } });
|
122 | const experimental = require("./experimental");
|
123 | exports.experimental = experimental;
|
124 | const resolver_dns = require("./resolver-dns");
|
125 | const resolver_uds = require("./resolver-uds");
|
126 | const resolver_ip = require("./resolver-ip");
|
127 | const load_balancer_pick_first = require("./load-balancer-pick-first");
|
128 | const load_balancer_round_robin = require("./load-balancer-round-robin");
|
129 | const load_balancer_outlier_detection = require("./load-balancer-outlier-detection");
|
130 | const channelz = require("./channelz");
|
131 | const clientVersion = require('../../package.json').version;
|
132 | (() => {
|
133 | logging.trace(constants_1.LogVerbosity.DEBUG, 'index', 'Loading @grpc/grpc-js version ' + clientVersion);
|
134 | resolver_dns.setup();
|
135 | resolver_uds.setup();
|
136 | resolver_ip.setup();
|
137 | load_balancer_pick_first.setup();
|
138 | load_balancer_round_robin.setup();
|
139 | load_balancer_outlier_detection.setup();
|
140 | channelz.setup();
|
141 | })();
|
142 |
|
\ | No newline at end of file |