@finsemble/finsemble-electron-adapter 6.2.1 → 6.3.1-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +1 -1
- package/dist/e2o.js +1 -1
- package/dist/e2o_view.js +1 -1
- package/dist/exports.js +1 -1
- package/dist/grpc/grpc.ts +9 -0
- package/exports.js +2 -1
- package/node_modules/@grpc/grpc-js/README.md +2 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.d.ts +11 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.js +31 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call-credentials-filter.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/call-stream.d.ts +14 -5
- package/node_modules/@grpc/grpc-js/build/src/call-stream.js +56 -20
- package/node_modules/@grpc/grpc-js/build/src/call-stream.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/call.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/channel-options.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/channel.d.ts +16 -7
- package/node_modules/@grpc/grpc-js/build/src/channel.js +138 -59
- package/node_modules/@grpc/grpc-js/build/src/channel.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/channelz.d.ts +122 -0
- package/node_modules/@grpc/grpc-js/build/src/channelz.js +568 -0
- package/node_modules/@grpc/grpc-js/build/src/channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/client.js +2 -1
- package/node_modules/@grpc/grpc-js/build/src/client.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/constants.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/deadline-filter.d.ts +3 -0
- package/node_modules/@grpc/grpc-js/build/src/deadline-filter.js +19 -5
- package/node_modules/@grpc/grpc-js/build/src/deadline-filter.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/experimental.d.ts +6 -5
- package/node_modules/@grpc/grpc-js/build/src/experimental.js +5 -2
- package/node_modules/@grpc/grpc-js/build/src/experimental.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts +4 -0
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.js +14 -0
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/filter.d.ts +2 -0
- package/node_modules/@grpc/grpc-js/build/src/filter.js +1 -0
- package/node_modules/@grpc/grpc-js/build/src/filter.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts +72 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js +3 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts +10 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts +10 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts +8 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts +10 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts +8 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts +80 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts +64 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts +22 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts +73 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts +42 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts +66 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js +16 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts +159 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts +14 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts +14 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts +36 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts +34 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts +26 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts +14 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts +34 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts +80 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts +41 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts +54 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts +66 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts +147 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts +43 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts +70 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts +66 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts +1 -1
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.js +11 -8
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/index.d.ts +7 -4
- package/node_modules/@grpc/grpc-js/build/src/index.js +19 -5
- package/node_modules/@grpc/grpc-js/build/src/index.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js +8 -2
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js +56 -49
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js +34 -31
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts +17 -4
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.js +36 -13
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/logging.js +35 -4
- package/node_modules/@grpc/grpc-js/build/src/logging.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/max-message-size-filter.d.ts +3 -3
- package/node_modules/@grpc/grpc-js/build/src/max-message-size-filter.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/metadata.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/metadata.js +11 -0
- package/node_modules/@grpc/grpc-js/build/src/metadata.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/picker.d.ts +5 -5
- package/node_modules/@grpc/grpc-js/build/src/picker.js +2 -2
- package/node_modules/@grpc/grpc-js/build/src/picker.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js +6 -5
- package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/resolver.d.ts +3 -2
- package/node_modules/@grpc/grpc-js/build/src/resolver.js +1 -10
- package/node_modules/@grpc/grpc-js/build/src/resolver.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts +1 -1
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js +23 -18
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/server-call.js +7 -3
- package/node_modules/@grpc/grpc-js/build/src/server-call.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/server.d.ts +10 -0
- package/node_modules/@grpc/grpc-js/build/src/server.js +230 -42
- package/node_modules/@grpc/grpc-js/build/src/server.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/service-config.d.ts +5 -1
- package/node_modules/@grpc/grpc-js/build/src/service-config.js +23 -3
- package/node_modules/@grpc/grpc-js/build/src/service-config.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js +17 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts +2 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js +2 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map +1 -1
- package/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts +30 -19
- package/node_modules/@grpc/grpc-js/build/src/subchannel.js +180 -78
- package/node_modules/@grpc/grpc-js/build/src/subchannel.js.map +1 -1
- package/node_modules/@grpc/grpc-js/node_modules/.bin/proto-loader-gen-types +15 -0
- package/node_modules/@grpc/grpc-js/node_modules/.bin/proto-loader-gen-types.cmd +7 -0
- package/node_modules/@grpc/grpc-js/package.json +9 -6
- package/node_modules/@grpc/grpc-js/proto/channelz.proto +564 -0
- package/node_modules/@grpc/grpc-js/src/admin.ts +39 -0
- package/node_modules/@grpc/grpc-js/src/call-credentials-filter.ts +3 -1
- package/node_modules/@grpc/grpc-js/src/call-stream.ts +75 -23
- package/node_modules/@grpc/grpc-js/src/call.ts +8 -4
- package/node_modules/@grpc/grpc-js/src/channel-options.ts +1 -0
- package/node_modules/@grpc/grpc-js/src/channel.ts +183 -73
- package/node_modules/@grpc/grpc-js/src/channelz.ts +727 -0
- package/node_modules/@grpc/grpc-js/src/client-interceptors.ts +8 -3
- package/node_modules/@grpc/grpc-js/src/client.ts +18 -16
- package/node_modules/@grpc/grpc-js/src/connectivity-state.ts +24 -0
- package/node_modules/@grpc/grpc-js/src/constants.ts +5 -1
- package/node_modules/@grpc/grpc-js/src/deadline-filter.ts +21 -5
- package/node_modules/@grpc/grpc-js/src/experimental.ts +36 -12
- package/node_modules/@grpc/grpc-js/src/filter-stack.ts +18 -0
- package/node_modules/@grpc/grpc-js/src/filter.ts +4 -0
- package/node_modules/@grpc/grpc-js/src/generated/channelz.ts +73 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts +11 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts +11 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts +89 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts +68 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts +29 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts +76 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts +73 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts +178 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts +39 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts +37 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts +29 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts +37 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts +57 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts +70 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts +150 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts +47 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts +74 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts +70 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/http_proxy.ts +15 -11
- package/node_modules/@grpc/grpc-js/src/index.ts +29 -6
- package/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts +12 -3
- package/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts +19 -8
- package/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts +15 -9
- package/node_modules/@grpc/grpc-js/src/load-balancer.ts +60 -21
- package/node_modules/@grpc/grpc-js/src/logging.ts +43 -7
- package/node_modules/@grpc/grpc-js/src/make-client.ts +1 -1
- package/node_modules/@grpc/grpc-js/src/max-message-size-filter.ts +18 -7
- package/node_modules/@grpc/grpc-js/src/metadata.ts +12 -0
- package/node_modules/@grpc/grpc-js/src/picker.ts +8 -8
- package/node_modules/@grpc/grpc-js/src/resolver-dns.ts +8 -2
- package/node_modules/@grpc/grpc-js/src/resolver-ip.ts +25 -16
- package/node_modules/@grpc/grpc-js/src/resolver-uds.ts +1 -1
- package/node_modules/@grpc/grpc-js/src/resolver.ts +5 -12
- package/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts +36 -14
- package/node_modules/@grpc/grpc-js/src/server-call.ts +11 -5
- package/node_modules/@grpc/grpc-js/src/server.ts +250 -44
- package/node_modules/@grpc/grpc-js/src/service-config.ts +35 -6
- package/node_modules/@grpc/grpc-js/src/subchannel-address.ts +79 -0
- package/node_modules/@grpc/grpc-js/src/subchannel-pool.ts +2 -2
- package/node_modules/@grpc/grpc-js/src/subchannel.ts +206 -97
- package/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +34 -0
- package/node_modules/@grpc/proto-loader/build/src/index.js +3 -0
- package/node_modules/@grpc/proto-loader/package.json +1 -1
- package/node_modules/{yargs/node_modules/y18n → y18n}/CHANGELOG.md +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/LICENSE +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/README.md +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/build/index.cjs +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/build/lib/cjs.js +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/build/lib/index.js +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/build/lib/platform-shims/node.js +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/index.mjs +0 -0
- package/node_modules/{yargs/node_modules/y18n → y18n}/package.json +0 -0
- package/package.json +41 -24
- package/dist/e2o.js.LICENSE.txt +0 -12
- package/dist/e2o_view.js.LICENSE.txt +0 -12
- package/dist/grpc/grpc.js +0 -8
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-registry.d.ts +0 -7
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-registry.js +0 -83
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-registry.js.map +0 -1
|
@@ -56,15 +56,14 @@ import {
|
|
|
56
56
|
TcpSubchannelAddress,
|
|
57
57
|
isTcpSubchannelAddress,
|
|
58
58
|
subchannelAddressToString,
|
|
59
|
-
|
|
59
|
+
stringToSubchannelAddress,
|
|
60
|
+
} from './subchannel-address';
|
|
60
61
|
import { parseUri } from './uri-parser';
|
|
62
|
+
import { ChannelzCallTracker, ChannelzChildrenTracker, ChannelzTrace, registerChannelzServer, registerChannelzSocket, ServerInfo, ServerRef, SocketInfo, SocketRef, TlsInfo, unregisterChannelzRef } from './channelz';
|
|
63
|
+
import { CipherNameAndProtocol, TLSSocket } from 'tls';
|
|
61
64
|
|
|
62
65
|
const TRACER_NAME = 'server';
|
|
63
66
|
|
|
64
|
-
function trace(text: string): void {
|
|
65
|
-
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
67
|
interface BindResult {
|
|
69
68
|
port: number;
|
|
70
69
|
count: number;
|
|
@@ -125,21 +124,101 @@ function getDefaultHandler(handlerType: HandlerType, methodName: string) {
|
|
|
125
124
|
}
|
|
126
125
|
}
|
|
127
126
|
|
|
127
|
+
interface ChannelzSessionInfo {
|
|
128
|
+
ref: SocketRef;
|
|
129
|
+
streamTracker: ChannelzCallTracker;
|
|
130
|
+
messagesSent: number;
|
|
131
|
+
messagesReceived: number;
|
|
132
|
+
lastMessageSentTimestamp: Date | null;
|
|
133
|
+
lastMessageReceivedTimestamp: Date | null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface ChannelzListenerInfo {
|
|
137
|
+
ref: SocketRef;
|
|
138
|
+
}
|
|
139
|
+
|
|
128
140
|
export class Server {
|
|
129
|
-
private http2ServerList: (http2.Http2Server | http2.Http2SecureServer)[] = [];
|
|
141
|
+
private http2ServerList: { server: (http2.Http2Server | http2.Http2SecureServer), channelzRef: SocketRef }[] = [];
|
|
130
142
|
|
|
131
143
|
private handlers: Map<string, UntypedHandler> = new Map<
|
|
132
144
|
string,
|
|
133
145
|
UntypedHandler
|
|
134
146
|
>();
|
|
135
|
-
private sessions = new
|
|
147
|
+
private sessions = new Map<http2.ServerHttp2Session, ChannelzSessionInfo>();
|
|
136
148
|
private started = false;
|
|
137
149
|
private options: ChannelOptions;
|
|
138
150
|
|
|
151
|
+
// Channelz Info
|
|
152
|
+
private channelzRef: ServerRef;
|
|
153
|
+
private channelzTrace = new ChannelzTrace();
|
|
154
|
+
private callTracker = new ChannelzCallTracker();
|
|
155
|
+
private listenerChildrenTracker = new ChannelzChildrenTracker();
|
|
156
|
+
private sessionChildrenTracker = new ChannelzChildrenTracker();
|
|
157
|
+
|
|
139
158
|
constructor(options?: ChannelOptions) {
|
|
140
159
|
this.options = options ?? {};
|
|
160
|
+
this.channelzRef = registerChannelzServer(() => this.getChannelzInfo());
|
|
161
|
+
this.channelzTrace.addTrace('CT_INFO', 'Server created');
|
|
162
|
+
this.trace('Server constructed');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
private getChannelzInfo(): ServerInfo {
|
|
166
|
+
return {
|
|
167
|
+
trace: this.channelzTrace,
|
|
168
|
+
callTracker: this.callTracker,
|
|
169
|
+
listenerChildren: this.listenerChildrenTracker.getChildLists(),
|
|
170
|
+
sessionChildren: this.sessionChildrenTracker.getChildLists()
|
|
171
|
+
};
|
|
141
172
|
}
|
|
142
173
|
|
|
174
|
+
private getChannelzSessionInfoGetter(session: http2.ServerHttp2Session): () => SocketInfo {
|
|
175
|
+
return () => {
|
|
176
|
+
const sessionInfo = this.sessions.get(session)!;
|
|
177
|
+
const sessionSocket = session.socket;
|
|
178
|
+
const remoteAddress = sessionSocket.remoteAddress ? stringToSubchannelAddress(sessionSocket.remoteAddress, sessionSocket.remotePort) : null;
|
|
179
|
+
const localAddress = stringToSubchannelAddress(sessionSocket.localAddress, sessionSocket.localPort);
|
|
180
|
+
let tlsInfo: TlsInfo | null;
|
|
181
|
+
if (session.encrypted) {
|
|
182
|
+
const tlsSocket: TLSSocket = sessionSocket as TLSSocket;
|
|
183
|
+
const cipherInfo: CipherNameAndProtocol & {standardName?: string} = tlsSocket.getCipher();
|
|
184
|
+
const certificate = tlsSocket.getCertificate();
|
|
185
|
+
const peerCertificate = tlsSocket.getPeerCertificate();
|
|
186
|
+
tlsInfo = {
|
|
187
|
+
cipherSuiteStandardName: cipherInfo.standardName ?? null,
|
|
188
|
+
cipherSuiteOtherName: cipherInfo.standardName ? null : cipherInfo.name,
|
|
189
|
+
localCertificate: (certificate && 'raw' in certificate) ? certificate.raw : null,
|
|
190
|
+
remoteCertificate: (peerCertificate && 'raw' in peerCertificate) ? peerCertificate.raw : null
|
|
191
|
+
};
|
|
192
|
+
} else {
|
|
193
|
+
tlsInfo = null;
|
|
194
|
+
}
|
|
195
|
+
const socketInfo: SocketInfo = {
|
|
196
|
+
remoteAddress: remoteAddress,
|
|
197
|
+
localAddress: localAddress,
|
|
198
|
+
security: tlsInfo,
|
|
199
|
+
remoteName: null,
|
|
200
|
+
streamsStarted: sessionInfo.streamTracker.callsStarted,
|
|
201
|
+
streamsSucceeded: sessionInfo.streamTracker.callsSucceeded,
|
|
202
|
+
streamsFailed: sessionInfo.streamTracker.callsFailed,
|
|
203
|
+
messagesSent: sessionInfo.messagesSent,
|
|
204
|
+
messagesReceived: sessionInfo.messagesReceived,
|
|
205
|
+
keepAlivesSent: 0,
|
|
206
|
+
lastLocalStreamCreatedTimestamp: null,
|
|
207
|
+
lastRemoteStreamCreatedTimestamp: sessionInfo.streamTracker.lastCallStartedTimestamp,
|
|
208
|
+
lastMessageSentTimestamp: sessionInfo.lastMessageSentTimestamp,
|
|
209
|
+
lastMessageReceivedTimestamp: sessionInfo.lastMessageReceivedTimestamp,
|
|
210
|
+
localFlowControlWindow: session.state.localWindowSize ?? null,
|
|
211
|
+
remoteFlowControlWindow: session.state.remoteWindowSize ?? null
|
|
212
|
+
};
|
|
213
|
+
return socketInfo;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private trace(text: string): void {
|
|
218
|
+
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, '(' + this.channelzRef.id + ') ' + text);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
143
222
|
addProtoService(): void {
|
|
144
223
|
throw new Error('Not implemented. Use addService() instead');
|
|
145
224
|
}
|
|
@@ -209,10 +288,7 @@ export class Server {
|
|
|
209
288
|
}
|
|
210
289
|
|
|
211
290
|
removeService(service: ServiceDefinition): void {
|
|
212
|
-
if (
|
|
213
|
-
service === null ||
|
|
214
|
-
typeof service !== 'object'
|
|
215
|
-
) {
|
|
291
|
+
if (service === null || typeof service !== 'object') {
|
|
216
292
|
throw new Error('removeService() requires object as argument');
|
|
217
293
|
}
|
|
218
294
|
|
|
@@ -240,8 +316,8 @@ export class Server {
|
|
|
240
316
|
throw new TypeError('port must be a string');
|
|
241
317
|
}
|
|
242
318
|
|
|
243
|
-
if (creds === null ||
|
|
244
|
-
throw new TypeError('creds must be
|
|
319
|
+
if (creds === null || !(creds instanceof ServerCredentials)) {
|
|
320
|
+
throw new TypeError('creds must be a ServerCredentials object');
|
|
245
321
|
}
|
|
246
322
|
|
|
247
323
|
if (typeof callback !== 'function') {
|
|
@@ -258,10 +334,12 @@ export class Server {
|
|
|
258
334
|
}
|
|
259
335
|
|
|
260
336
|
const serverOptions: http2.ServerOptions = {
|
|
261
|
-
maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER
|
|
337
|
+
maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER,
|
|
262
338
|
};
|
|
263
339
|
if ('grpc-node.max_session_memory' in this.options) {
|
|
264
|
-
serverOptions.maxSessionMemory = this.options[
|
|
340
|
+
serverOptions.maxSessionMemory = this.options[
|
|
341
|
+
'grpc-node.max_session_memory'
|
|
342
|
+
];
|
|
265
343
|
}
|
|
266
344
|
if ('grpc.max_concurrent_streams' in this.options) {
|
|
267
345
|
serverOptions.settings = {
|
|
@@ -269,6 +347,10 @@ export class Server {
|
|
|
269
347
|
};
|
|
270
348
|
}
|
|
271
349
|
|
|
350
|
+
const deferredCallback = (error: Error | null, port: number) => {
|
|
351
|
+
process.nextTick(() => callback(error, port));
|
|
352
|
+
}
|
|
353
|
+
|
|
272
354
|
const setupServer = (): http2.Http2Server | http2.Http2SecureServer => {
|
|
273
355
|
let http2Server: http2.Http2Server | http2.Http2SecureServer;
|
|
274
356
|
if (creds._isSecure()) {
|
|
@@ -296,7 +378,7 @@ export class Server {
|
|
|
296
378
|
}
|
|
297
379
|
return Promise.all(
|
|
298
380
|
addressList.map((address) => {
|
|
299
|
-
trace('Attempting to bind ' + subchannelAddressToString(address));
|
|
381
|
+
this.trace('Attempting to bind ' + subchannelAddressToString(address));
|
|
300
382
|
let addr: SubchannelAddress;
|
|
301
383
|
if (isTcpSubchannelAddress(address)) {
|
|
302
384
|
addr = {
|
|
@@ -309,21 +391,50 @@ export class Server {
|
|
|
309
391
|
|
|
310
392
|
const http2Server = setupServer();
|
|
311
393
|
return new Promise<number | Error>((resolve, reject) => {
|
|
312
|
-
|
|
394
|
+
const onError = (err: Error) => {
|
|
395
|
+
this.trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
|
|
313
396
|
resolve(err);
|
|
314
397
|
}
|
|
315
398
|
|
|
316
399
|
http2Server.once('error', onError);
|
|
317
400
|
|
|
318
401
|
http2Server.listen(addr, () => {
|
|
319
|
-
trace('Successfully bound ' + subchannelAddressToString(address));
|
|
320
|
-
this.http2ServerList.push(http2Server);
|
|
321
402
|
const boundAddress = http2Server.address()!;
|
|
403
|
+
let boundSubchannelAddress: SubchannelAddress;
|
|
322
404
|
if (typeof boundAddress === 'string') {
|
|
323
|
-
|
|
405
|
+
boundSubchannelAddress = {
|
|
406
|
+
path: boundAddress
|
|
407
|
+
};
|
|
324
408
|
} else {
|
|
325
|
-
|
|
409
|
+
boundSubchannelAddress = {
|
|
410
|
+
host: boundAddress.address,
|
|
411
|
+
port: boundAddress.port
|
|
412
|
+
}
|
|
326
413
|
}
|
|
414
|
+
const channelzRef = registerChannelzSocket(subchannelAddressToString(boundSubchannelAddress), () => {
|
|
415
|
+
return {
|
|
416
|
+
localAddress: boundSubchannelAddress,
|
|
417
|
+
remoteAddress: null,
|
|
418
|
+
security: null,
|
|
419
|
+
remoteName: null,
|
|
420
|
+
streamsStarted: 0,
|
|
421
|
+
streamsSucceeded: 0,
|
|
422
|
+
streamsFailed: 0,
|
|
423
|
+
messagesSent: 0,
|
|
424
|
+
messagesReceived: 0,
|
|
425
|
+
keepAlivesSent: 0,
|
|
426
|
+
lastLocalStreamCreatedTimestamp: null,
|
|
427
|
+
lastRemoteStreamCreatedTimestamp: null,
|
|
428
|
+
lastMessageSentTimestamp: null,
|
|
429
|
+
lastMessageReceivedTimestamp: null,
|
|
430
|
+
localFlowControlWindow: null,
|
|
431
|
+
remoteFlowControlWindow: null
|
|
432
|
+
};
|
|
433
|
+
});
|
|
434
|
+
this.listenerChildrenTracker.refChild(channelzRef);
|
|
435
|
+
this.http2ServerList.push({server: http2Server, channelzRef: channelzRef});
|
|
436
|
+
this.trace('Successfully bound ' + subchannelAddressToString(boundSubchannelAddress));
|
|
437
|
+
resolve('port' in boundSubchannelAddress ? boundSubchannelAddress.port : portNum);
|
|
327
438
|
http2Server.removeListener('error', onError);
|
|
328
439
|
});
|
|
329
440
|
});
|
|
@@ -356,18 +467,46 @@ export class Server {
|
|
|
356
467
|
const address = addressList[0];
|
|
357
468
|
const http2Server = setupServer();
|
|
358
469
|
return new Promise<BindResult>((resolve, reject) => {
|
|
359
|
-
|
|
470
|
+
const onError = (err: Error) => {
|
|
471
|
+
this.trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
|
|
360
472
|
resolve(bindWildcardPort(addressList.slice(1)));
|
|
361
473
|
}
|
|
362
474
|
|
|
363
475
|
http2Server.once('error', onError);
|
|
364
476
|
|
|
365
477
|
http2Server.listen(address, () => {
|
|
366
|
-
|
|
478
|
+
const boundAddress = http2Server.address() as AddressInfo;
|
|
479
|
+
const boundSubchannelAddress: SubchannelAddress = {
|
|
480
|
+
host: boundAddress.address,
|
|
481
|
+
port: boundAddress.port
|
|
482
|
+
};
|
|
483
|
+
const channelzRef = registerChannelzSocket(subchannelAddressToString(boundSubchannelAddress), () => {
|
|
484
|
+
return {
|
|
485
|
+
localAddress: boundSubchannelAddress,
|
|
486
|
+
remoteAddress: null,
|
|
487
|
+
security: null,
|
|
488
|
+
remoteName: null,
|
|
489
|
+
streamsStarted: 0,
|
|
490
|
+
streamsSucceeded: 0,
|
|
491
|
+
streamsFailed: 0,
|
|
492
|
+
messagesSent: 0,
|
|
493
|
+
messagesReceived: 0,
|
|
494
|
+
keepAlivesSent: 0,
|
|
495
|
+
lastLocalStreamCreatedTimestamp: null,
|
|
496
|
+
lastRemoteStreamCreatedTimestamp: null,
|
|
497
|
+
lastMessageSentTimestamp: null,
|
|
498
|
+
lastMessageReceivedTimestamp: null,
|
|
499
|
+
localFlowControlWindow: null,
|
|
500
|
+
remoteFlowControlWindow: null
|
|
501
|
+
};
|
|
502
|
+
});
|
|
503
|
+
this.listenerChildrenTracker.refChild(channelzRef);
|
|
504
|
+
this.http2ServerList.push({server: http2Server, channelzRef: channelzRef});
|
|
505
|
+
this.trace('Successfully bound ' + subchannelAddressToString(boundSubchannelAddress));
|
|
367
506
|
resolve(
|
|
368
507
|
bindSpecificPort(
|
|
369
508
|
addressList.slice(1),
|
|
370
|
-
|
|
509
|
+
boundAddress.port,
|
|
371
510
|
1
|
|
372
511
|
)
|
|
373
512
|
);
|
|
@@ -385,7 +524,7 @@ export class Server {
|
|
|
385
524
|
// We only want one resolution result. Discard all future results
|
|
386
525
|
resolverListener.onSuccessfulResolution = () => {};
|
|
387
526
|
if (addressList.length === 0) {
|
|
388
|
-
|
|
527
|
+
deferredCallback(new Error(`No addresses resolved for port ${port}`), 0);
|
|
389
528
|
return;
|
|
390
529
|
}
|
|
391
530
|
let bindResultPromise: Promise<BindResult>;
|
|
@@ -408,7 +547,7 @@ export class Server {
|
|
|
408
547
|
if (bindResult.count === 0) {
|
|
409
548
|
const errorString = `No address added out of total ${addressList.length} resolved`;
|
|
410
549
|
logging.log(LogVerbosity.ERROR, errorString);
|
|
411
|
-
|
|
550
|
+
deferredCallback(new Error(errorString), 0);
|
|
412
551
|
} else {
|
|
413
552
|
if (bindResult.count < addressList.length) {
|
|
414
553
|
logging.log(
|
|
@@ -416,18 +555,18 @@ export class Server {
|
|
|
416
555
|
`WARNING Only ${bindResult.count} addresses added out of total ${addressList.length} resolved`
|
|
417
556
|
);
|
|
418
557
|
}
|
|
419
|
-
|
|
558
|
+
deferredCallback(null, bindResult.port);
|
|
420
559
|
}
|
|
421
560
|
},
|
|
422
561
|
(error) => {
|
|
423
562
|
const errorString = `No address added out of total ${addressList.length} resolved`;
|
|
424
563
|
logging.log(LogVerbosity.ERROR, errorString);
|
|
425
|
-
|
|
564
|
+
deferredCallback(new Error(errorString), 0);
|
|
426
565
|
}
|
|
427
566
|
);
|
|
428
567
|
},
|
|
429
568
|
onError: (error) => {
|
|
430
|
-
|
|
569
|
+
deferredCallback(new Error(error.details), 0);
|
|
431
570
|
},
|
|
432
571
|
};
|
|
433
572
|
|
|
@@ -438,9 +577,12 @@ export class Server {
|
|
|
438
577
|
forceShutdown(): void {
|
|
439
578
|
// Close the server if it is still running.
|
|
440
579
|
|
|
441
|
-
for (const http2Server of this.http2ServerList) {
|
|
580
|
+
for (const {server: http2Server, channelzRef: ref} of this.http2ServerList) {
|
|
442
581
|
if (http2Server.listening) {
|
|
443
|
-
http2Server.close()
|
|
582
|
+
http2Server.close(() => {
|
|
583
|
+
this.listenerChildrenTracker.unrefChild(ref);
|
|
584
|
+
unregisterChannelzRef(ref);
|
|
585
|
+
});
|
|
444
586
|
}
|
|
445
587
|
}
|
|
446
588
|
|
|
@@ -448,13 +590,14 @@ export class Server {
|
|
|
448
590
|
|
|
449
591
|
// Always destroy any available sessions. It's possible that one or more
|
|
450
592
|
// tryShutdown() calls are in progress. Don't wait on them to finish.
|
|
451
|
-
this.sessions.forEach((session) => {
|
|
593
|
+
this.sessions.forEach((channelzInfo, session) => {
|
|
452
594
|
// Cast NGHTTP2_CANCEL to any because TypeScript doesn't seem to
|
|
453
595
|
// recognize destroy(code) as a valid signature.
|
|
454
596
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
455
597
|
session.destroy(http2.constants.NGHTTP2_CANCEL as any);
|
|
456
598
|
});
|
|
457
599
|
this.sessions.clear();
|
|
600
|
+
unregisterChannelzRef(this.channelzRef);
|
|
458
601
|
}
|
|
459
602
|
|
|
460
603
|
register<RequestType, ResponseType>(
|
|
@@ -486,7 +629,7 @@ export class Server {
|
|
|
486
629
|
if (
|
|
487
630
|
this.http2ServerList.length === 0 ||
|
|
488
631
|
this.http2ServerList.every(
|
|
489
|
-
(http2Server) => http2Server.listening !== true
|
|
632
|
+
({server: http2Server}) => http2Server.listening !== true
|
|
490
633
|
)
|
|
491
634
|
) {
|
|
492
635
|
throw new Error('server must be bound in order to start');
|
|
@@ -495,39 +638,47 @@ export class Server {
|
|
|
495
638
|
if (this.started === true) {
|
|
496
639
|
throw new Error('server is already started');
|
|
497
640
|
}
|
|
498
|
-
|
|
641
|
+
this.channelzTrace.addTrace('CT_INFO', 'Starting');
|
|
499
642
|
this.started = true;
|
|
500
643
|
}
|
|
501
644
|
|
|
502
645
|
tryShutdown(callback: (error?: Error) => void): void {
|
|
646
|
+
const wrappedCallback = (error?: Error) => {
|
|
647
|
+
unregisterChannelzRef(this.channelzRef);
|
|
648
|
+
callback(error);
|
|
649
|
+
};
|
|
503
650
|
let pendingChecks = 0;
|
|
504
651
|
|
|
505
652
|
function maybeCallback(): void {
|
|
506
653
|
pendingChecks--;
|
|
507
654
|
|
|
508
655
|
if (pendingChecks === 0) {
|
|
509
|
-
|
|
656
|
+
wrappedCallback();
|
|
510
657
|
}
|
|
511
658
|
}
|
|
512
659
|
|
|
513
660
|
// Close the server if necessary.
|
|
514
661
|
this.started = false;
|
|
515
662
|
|
|
516
|
-
for (const http2Server of this.http2ServerList) {
|
|
663
|
+
for (const {server: http2Server, channelzRef: ref} of this.http2ServerList) {
|
|
517
664
|
if (http2Server.listening) {
|
|
518
665
|
pendingChecks++;
|
|
519
|
-
http2Server.close(
|
|
666
|
+
http2Server.close(() => {
|
|
667
|
+
this.listenerChildrenTracker.unrefChild(ref);
|
|
668
|
+
unregisterChannelzRef(ref);
|
|
669
|
+
maybeCallback();
|
|
670
|
+
});
|
|
520
671
|
}
|
|
521
672
|
}
|
|
522
673
|
|
|
523
|
-
this.sessions.forEach((session) => {
|
|
674
|
+
this.sessions.forEach((channelzInfo, session) => {
|
|
524
675
|
if (!session.closed) {
|
|
525
676
|
pendingChecks += 1;
|
|
526
677
|
session.close(maybeCallback);
|
|
527
678
|
}
|
|
528
679
|
});
|
|
529
680
|
if (pendingChecks === 0) {
|
|
530
|
-
|
|
681
|
+
wrappedCallback();
|
|
531
682
|
}
|
|
532
683
|
}
|
|
533
684
|
|
|
@@ -535,6 +686,10 @@ export class Server {
|
|
|
535
686
|
throw new Error('Not yet implemented');
|
|
536
687
|
}
|
|
537
688
|
|
|
689
|
+
getChannelzRef() {
|
|
690
|
+
return this.channelzRef;
|
|
691
|
+
}
|
|
692
|
+
|
|
538
693
|
private _setupHandlers(
|
|
539
694
|
http2Server: http2.Http2Server | http2.Http2SecureServer
|
|
540
695
|
): void {
|
|
@@ -545,6 +700,9 @@ export class Server {
|
|
|
545
700
|
http2Server.on(
|
|
546
701
|
'stream',
|
|
547
702
|
(stream: http2.ServerHttp2Stream, headers: http2.IncomingHttpHeaders) => {
|
|
703
|
+
const channelzSessionInfo = this.sessions.get(stream.session as http2.ServerHttp2Session);
|
|
704
|
+
this.callTracker.addCallStarted();
|
|
705
|
+
channelzSessionInfo?.streamTracker.addCallStarted();
|
|
548
706
|
const contentType = headers[http2.constants.HTTP2_HEADER_CONTENT_TYPE];
|
|
549
707
|
|
|
550
708
|
if (
|
|
@@ -558,9 +716,13 @@ export class Server {
|
|
|
558
716
|
},
|
|
559
717
|
{ endStream: true }
|
|
560
718
|
);
|
|
719
|
+
this.callTracker.addCallFailed();
|
|
720
|
+
channelzSessionInfo?.streamTracker.addCallFailed();
|
|
561
721
|
return;
|
|
562
722
|
}
|
|
563
723
|
|
|
724
|
+
let call: Http2ServerCallStream<any, any> | null = null;
|
|
725
|
+
|
|
564
726
|
try {
|
|
565
727
|
const path = headers[http2.constants.HTTP2_HEADER_PATH] as string;
|
|
566
728
|
const serverAddress = http2Server.address();
|
|
@@ -573,7 +735,7 @@ export class Server {
|
|
|
573
735
|
serverAddress.address + ':' + serverAddress.port;
|
|
574
736
|
}
|
|
575
737
|
}
|
|
576
|
-
trace(
|
|
738
|
+
this.trace(
|
|
577
739
|
'Received call to method ' +
|
|
578
740
|
path +
|
|
579
741
|
' at address ' +
|
|
@@ -582,7 +744,7 @@ export class Server {
|
|
|
582
744
|
const handler = this.handlers.get(path);
|
|
583
745
|
|
|
584
746
|
if (handler === undefined) {
|
|
585
|
-
trace(
|
|
747
|
+
this.trace(
|
|
586
748
|
'No handler registered for method ' +
|
|
587
749
|
path +
|
|
588
750
|
'. Sending UNIMPLEMENTED status.'
|
|
@@ -590,7 +752,31 @@ export class Server {
|
|
|
590
752
|
throw getUnimplementedStatusResponse(path);
|
|
591
753
|
}
|
|
592
754
|
|
|
593
|
-
|
|
755
|
+
call = new Http2ServerCallStream(stream, handler, this.options);
|
|
756
|
+
call.once('callEnd', (code: Status) => {
|
|
757
|
+
if (code === Status.OK) {
|
|
758
|
+
this.callTracker.addCallSucceeded();
|
|
759
|
+
} else {
|
|
760
|
+
this.callTracker.addCallFailed();
|
|
761
|
+
}
|
|
762
|
+
});
|
|
763
|
+
if (channelzSessionInfo) {
|
|
764
|
+
call.once('streamEnd', (success: boolean) => {
|
|
765
|
+
if (success) {
|
|
766
|
+
channelzSessionInfo.streamTracker.addCallSucceeded();
|
|
767
|
+
} else {
|
|
768
|
+
channelzSessionInfo.streamTracker.addCallFailed();
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
call.on('sendMessage', () => {
|
|
772
|
+
channelzSessionInfo.messagesSent += 1;
|
|
773
|
+
channelzSessionInfo.lastMessageSentTimestamp = new Date();
|
|
774
|
+
});
|
|
775
|
+
call.on('receiveMessage', () => {
|
|
776
|
+
channelzSessionInfo.messagesReceived += 1;
|
|
777
|
+
channelzSessionInfo.lastMessageReceivedTimestamp = new Date();
|
|
778
|
+
});
|
|
779
|
+
}
|
|
594
780
|
const metadata: Metadata = call.receiveMetadata(headers) as Metadata;
|
|
595
781
|
switch (handler.type) {
|
|
596
782
|
case 'unary':
|
|
@@ -621,7 +807,11 @@ export class Server {
|
|
|
621
807
|
throw new Error(`Unknown handler type: ${handler.type}`);
|
|
622
808
|
}
|
|
623
809
|
} catch (err) {
|
|
624
|
-
|
|
810
|
+
if (!call) {
|
|
811
|
+
call = new Http2ServerCallStream(stream, null!, this.options);
|
|
812
|
+
this.callTracker.addCallFailed();
|
|
813
|
+
channelzSessionInfo?.streamTracker.addCallFailed()
|
|
814
|
+
}
|
|
625
815
|
|
|
626
816
|
if (err.code === undefined) {
|
|
627
817
|
err.code = Status.INTERNAL;
|
|
@@ -638,9 +828,25 @@ export class Server {
|
|
|
638
828
|
return;
|
|
639
829
|
}
|
|
640
830
|
|
|
641
|
-
this.
|
|
831
|
+
const channelzRef = registerChannelzSocket(session.socket.remoteAddress ?? 'unknown', this.getChannelzSessionInfoGetter(session));
|
|
832
|
+
|
|
833
|
+
const channelzSessionInfo: ChannelzSessionInfo = {
|
|
834
|
+
ref: channelzRef,
|
|
835
|
+
streamTracker: new ChannelzCallTracker(),
|
|
836
|
+
messagesSent: 0,
|
|
837
|
+
messagesReceived: 0,
|
|
838
|
+
lastMessageSentTimestamp: null,
|
|
839
|
+
lastMessageReceivedTimestamp: null
|
|
840
|
+
};
|
|
642
841
|
|
|
842
|
+
this.sessions.set(session, channelzSessionInfo);
|
|
843
|
+
const clientAddress = session.socket.remoteAddress;
|
|
844
|
+
this.channelzTrace.addTrace('CT_INFO', 'Connection established by client ' + clientAddress);
|
|
845
|
+
this.sessionChildrenTracker.refChild(channelzRef);
|
|
643
846
|
session.on('close', () => {
|
|
847
|
+
this.channelzTrace.addTrace('CT_INFO', 'Connection dropped by client ' + clientAddress);
|
|
848
|
+
this.sessionChildrenTracker.unrefChild(channelzRef);
|
|
849
|
+
unregisterChannelzRef(channelzRef);
|
|
644
850
|
this.sessions.delete(session);
|
|
645
851
|
});
|
|
646
852
|
});
|
|
@@ -27,17 +27,25 @@
|
|
|
27
27
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
28
28
|
|
|
29
29
|
import * as os from 'os';
|
|
30
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
LoadBalancingConfig,
|
|
32
|
+
validateLoadBalancingConfig,
|
|
33
|
+
} from './load-balancer';
|
|
31
34
|
|
|
32
35
|
export interface MethodConfigName {
|
|
33
36
|
service: string;
|
|
34
37
|
method?: string;
|
|
35
38
|
}
|
|
36
39
|
|
|
40
|
+
export interface Duration {
|
|
41
|
+
seconds: number;
|
|
42
|
+
nanos: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
export interface MethodConfig {
|
|
38
46
|
name: MethodConfigName[];
|
|
39
47
|
waitForReady?: boolean;
|
|
40
|
-
timeout?:
|
|
48
|
+
timeout?: Duration;
|
|
41
49
|
maxRequestBytes?: number;
|
|
42
50
|
maxResponseBytes?: number;
|
|
43
51
|
}
|
|
@@ -101,13 +109,34 @@ function validateMethodConfig(obj: any): MethodConfig {
|
|
|
101
109
|
result.waitForReady = obj.waitForReady;
|
|
102
110
|
}
|
|
103
111
|
if ('timeout' in obj) {
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
if (typeof obj.timeout === 'object') {
|
|
113
|
+
if (
|
|
114
|
+
!('seconds' in obj.timeout) ||
|
|
115
|
+
!(typeof obj.timeout.seconds === 'number')
|
|
116
|
+
) {
|
|
117
|
+
throw new Error('Invalid method config: invalid timeout.seconds');
|
|
118
|
+
}
|
|
119
|
+
if (
|
|
120
|
+
!('nanos' in obj.timeout) ||
|
|
121
|
+
!(typeof obj.timeout.nanos === 'number')
|
|
122
|
+
) {
|
|
123
|
+
throw new Error('Invalid method config: invalid timeout.nanos');
|
|
124
|
+
}
|
|
125
|
+
result.timeout = obj.timeout;
|
|
126
|
+
} else if (
|
|
127
|
+
typeof obj.timeout === 'string' &&
|
|
128
|
+
TIMEOUT_REGEX.test(obj.timeout)
|
|
107
129
|
) {
|
|
130
|
+
const timeoutParts = obj.timeout
|
|
131
|
+
.substring(0, obj.timeout.length - 1)
|
|
132
|
+
.split('.');
|
|
133
|
+
result.timeout = {
|
|
134
|
+
seconds: timeoutParts[0] | 0,
|
|
135
|
+
nanos: (timeoutParts[1] ?? 0) | 0,
|
|
136
|
+
};
|
|
137
|
+
} else {
|
|
108
138
|
throw new Error('Invalid method config: invalid timeout');
|
|
109
139
|
}
|
|
110
|
-
result.timeout = obj.timeout;
|
|
111
140
|
}
|
|
112
141
|
if ('maxRequestBytes' in obj) {
|
|
113
142
|
if (typeof obj.maxRequestBytes !== 'number') {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 gRPC authors.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { isIP } from "net";
|
|
19
|
+
|
|
20
|
+
export interface TcpSubchannelAddress {
|
|
21
|
+
port: number;
|
|
22
|
+
host: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IpcSubchannelAddress {
|
|
26
|
+
path: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* This represents a single backend address to connect to. This interface is a
|
|
30
|
+
* subset of net.SocketConnectOpts, i.e. the options described at
|
|
31
|
+
* https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener.
|
|
32
|
+
* Those are in turn a subset of the options that can be passed to http2.connect.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
export type SubchannelAddress = TcpSubchannelAddress | IpcSubchannelAddress;
|
|
36
|
+
|
|
37
|
+
export function isTcpSubchannelAddress(
|
|
38
|
+
address: SubchannelAddress
|
|
39
|
+
): address is TcpSubchannelAddress {
|
|
40
|
+
return 'port' in address;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function subchannelAddressEqual(
|
|
44
|
+
address1: SubchannelAddress,
|
|
45
|
+
address2: SubchannelAddress
|
|
46
|
+
): boolean {
|
|
47
|
+
if (isTcpSubchannelAddress(address1)) {
|
|
48
|
+
return (
|
|
49
|
+
isTcpSubchannelAddress(address2) &&
|
|
50
|
+
address1.host === address2.host &&
|
|
51
|
+
address1.port === address2.port
|
|
52
|
+
);
|
|
53
|
+
} else {
|
|
54
|
+
return !isTcpSubchannelAddress(address2) && address1.path === address2.path;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function subchannelAddressToString(address: SubchannelAddress): string {
|
|
59
|
+
if (isTcpSubchannelAddress(address)) {
|
|
60
|
+
return address.host + ':' + address.port;
|
|
61
|
+
} else {
|
|
62
|
+
return address.path;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const DEFAULT_PORT = 443;
|
|
67
|
+
|
|
68
|
+
export function stringToSubchannelAddress(addressString: string, port?: number): SubchannelAddress {
|
|
69
|
+
if (isIP(addressString)) {
|
|
70
|
+
return {
|
|
71
|
+
host: addressString,
|
|
72
|
+
port: port ?? DEFAULT_PORT
|
|
73
|
+
};
|
|
74
|
+
} else {
|
|
75
|
+
return {
|
|
76
|
+
path: addressString
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|