UNPKG

1.6 kBJavaScriptView Raw
1"use strict";
2/*
3 * Copyright 2022 gRPC authors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18Object.defineProperty(exports, "__esModule", { value: true });
19exports.BaseSubchannelWrapper = void 0;
20class BaseSubchannelWrapper {
21 constructor(child) {
22 this.child = child;
23 }
24 getConnectivityState() {
25 return this.child.getConnectivityState();
26 }
27 addConnectivityStateListener(listener) {
28 this.child.addConnectivityStateListener(listener);
29 }
30 removeConnectivityStateListener(listener) {
31 this.child.removeConnectivityStateListener(listener);
32 }
33 startConnecting() {
34 this.child.startConnecting();
35 }
36 getAddress() {
37 return this.child.getAddress();
38 }
39 ref() {
40 this.child.ref();
41 }
42 unref() {
43 this.child.unref();
44 }
45 getChannelzRef() {
46 return this.child.getChannelzRef();
47 }
48 getRealSubchannel() {
49 return this.child.getRealSubchannel();
50 }
51}
52exports.BaseSubchannelWrapper = BaseSubchannelWrapper;
53//# sourceMappingURL=subchannel-interface.js.map
\No newline at end of file