@reptilestyle/grpc-js 1.9.14-compression.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/LICENSE +201 -0
- package/README.md +79 -0
- package/build/src/admin.d.ts +11 -0
- package/build/src/admin.js +30 -0
- package/build/src/admin.js.map +1 -0
- package/build/src/backoff-timeout.d.ts +90 -0
- package/build/src/backoff-timeout.js +174 -0
- package/build/src/backoff-timeout.js.map +1 -0
- package/build/src/call-credentials.d.ts +56 -0
- package/build/src/call-credentials.js +153 -0
- package/build/src/call-credentials.js.map +1 -0
- package/build/src/call-interface.d.ts +85 -0
- package/build/src/call-interface.js +84 -0
- package/build/src/call-interface.js.map +1 -0
- package/build/src/call-number.d.ts +1 -0
- package/build/src/call-number.js +24 -0
- package/build/src/call-number.js.map +1 -0
- package/build/src/call.d.ts +80 -0
- package/build/src/call.js +136 -0
- package/build/src/call.js.map +1 -0
- package/build/src/channel-credentials.d.ts +81 -0
- package/build/src/channel-credentials.js +177 -0
- package/build/src/channel-credentials.js.map +1 -0
- package/build/src/channel-options.d.ts +72 -0
- package/build/src/channel-options.js +69 -0
- package/build/src/channel-options.js.map +1 -0
- package/build/src/channel.d.ts +76 -0
- package/build/src/channel.js +68 -0
- package/build/src/channel.js.map +1 -0
- package/build/src/channelz.d.ts +108 -0
- package/build/src/channelz.js +637 -0
- package/build/src/channelz.js.map +1 -0
- package/build/src/client-interceptors.d.ts +120 -0
- package/build/src/client-interceptors.js +428 -0
- package/build/src/client-interceptors.js.map +1 -0
- package/build/src/client.d.ts +74 -0
- package/build/src/client.js +431 -0
- package/build/src/client.js.map +1 -0
- package/build/src/compression-algorithms.d.ts +5 -0
- package/build/src/compression-algorithms.js +26 -0
- package/build/src/compression-algorithms.js.map +1 -0
- package/build/src/compression-filter.d.ts +26 -0
- package/build/src/compression-filter.js +257 -0
- package/build/src/compression-filter.js.map +1 -0
- package/build/src/connectivity-state.d.ts +7 -0
- package/build/src/connectivity-state.js +28 -0
- package/build/src/connectivity-state.js.map +1 -0
- package/build/src/constants.d.ts +38 -0
- package/build/src/constants.js +64 -0
- package/build/src/constants.js.map +1 -0
- package/build/src/control-plane-status.d.ts +5 -0
- package/build/src/control-plane-status.js +42 -0
- package/build/src/control-plane-status.js.map +1 -0
- package/build/src/deadline.d.ts +14 -0
- package/build/src/deadline.js +97 -0
- package/build/src/deadline.js.map +1 -0
- package/build/src/duration.d.ts +7 -0
- package/build/src/duration.js +34 -0
- package/build/src/duration.js.map +1 -0
- package/build/src/error.d.ts +2 -0
- package/build/src/error.js +40 -0
- package/build/src/error.js.map +1 -0
- package/build/src/events.d.ts +9 -0
- package/build/src/events.js +19 -0
- package/build/src/events.js.map +1 -0
- package/build/src/experimental.d.ts +16 -0
- package/build/src/experimental.js +39 -0
- package/build/src/experimental.js.map +1 -0
- package/build/src/filter-stack.d.ts +21 -0
- package/build/src/filter-stack.js +82 -0
- package/build/src/filter-stack.js.map +1 -0
- package/build/src/filter.d.ts +25 -0
- package/build/src/filter.js +38 -0
- package/build/src/filter.js.map +1 -0
- package/build/src/generated/channelz.d.ts +72 -0
- package/build/src/generated/channelz.js +3 -0
- package/build/src/generated/channelz.js.map +1 -0
- package/build/src/generated/google/protobuf/Any.d.ts +9 -0
- package/build/src/generated/google/protobuf/Any.js +4 -0
- package/build/src/generated/google/protobuf/Any.js.map +1 -0
- package/build/src/generated/google/protobuf/BoolValue.d.ts +6 -0
- package/build/src/generated/google/protobuf/BoolValue.js +4 -0
- package/build/src/generated/google/protobuf/BoolValue.js.map +1 -0
- package/build/src/generated/google/protobuf/BytesValue.d.ts +6 -0
- package/build/src/generated/google/protobuf/BytesValue.js +4 -0
- package/build/src/generated/google/protobuf/BytesValue.js.map +1 -0
- package/build/src/generated/google/protobuf/DoubleValue.d.ts +6 -0
- package/build/src/generated/google/protobuf/DoubleValue.js +4 -0
- package/build/src/generated/google/protobuf/DoubleValue.js.map +1 -0
- package/build/src/generated/google/protobuf/Duration.d.ts +9 -0
- package/build/src/generated/google/protobuf/Duration.js +4 -0
- package/build/src/generated/google/protobuf/Duration.js.map +1 -0
- package/build/src/generated/google/protobuf/FloatValue.d.ts +6 -0
- package/build/src/generated/google/protobuf/FloatValue.js +4 -0
- package/build/src/generated/google/protobuf/FloatValue.js.map +1 -0
- package/build/src/generated/google/protobuf/Int32Value.d.ts +6 -0
- package/build/src/generated/google/protobuf/Int32Value.js +4 -0
- package/build/src/generated/google/protobuf/Int32Value.js.map +1 -0
- package/build/src/generated/google/protobuf/Int64Value.d.ts +7 -0
- package/build/src/generated/google/protobuf/Int64Value.js +4 -0
- package/build/src/generated/google/protobuf/Int64Value.js.map +1 -0
- package/build/src/generated/google/protobuf/StringValue.d.ts +6 -0
- package/build/src/generated/google/protobuf/StringValue.js +4 -0
- package/build/src/generated/google/protobuf/StringValue.js.map +1 -0
- package/build/src/generated/google/protobuf/Timestamp.d.ts +9 -0
- package/build/src/generated/google/protobuf/Timestamp.js +4 -0
- package/build/src/generated/google/protobuf/Timestamp.js.map +1 -0
- package/build/src/generated/google/protobuf/UInt32Value.d.ts +6 -0
- package/build/src/generated/google/protobuf/UInt32Value.js +4 -0
- package/build/src/generated/google/protobuf/UInt32Value.js.map +1 -0
- package/build/src/generated/google/protobuf/UInt64Value.d.ts +7 -0
- package/build/src/generated/google/protobuf/UInt64Value.js +4 -0
- package/build/src/generated/google/protobuf/UInt64Value.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Address.d.ts +79 -0
- package/build/src/generated/grpc/channelz/v1/Address.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Address.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Channel.d.ts +64 -0
- package/build/src/generated/grpc/channelz/v1/Channel.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Channel.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts +24 -0
- package/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js +14 -0
- package/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ChannelData.d.ts +72 -0
- package/build/src/generated/grpc/channelz/v1/ChannelData.js +4 -0
- package/build/src/generated/grpc/channelz/v1/ChannelData.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts +27 -0
- package/build/src/generated/grpc/channelz/v1/ChannelRef.js +4 -0
- package/build/src/generated/grpc/channelz/v1/ChannelRef.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts +41 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTrace.js +4 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts +74 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js +15 -0
- package/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Channelz.d.ts +159 -0
- package/build/src/generated/grpc/channelz/v1/Channelz.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Channelz.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts +13 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts +15 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts +13 -0
- package/build/src/generated/grpc/channelz/v1/GetServerRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts +15 -0
- package/build/src/generated/grpc/channelz/v1/GetServerResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts +35 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts +29 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts +33 -0
- package/build/src/generated/grpc/channelz/v1/GetServersRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts +29 -0
- package/build/src/generated/grpc/channelz/v1/GetServersResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts +25 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts +15 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts +13 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts +15 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts +33 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts +29 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js +4 -0
- package/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Security.d.ts +79 -0
- package/build/src/generated/grpc/channelz/v1/Security.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Security.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Server.d.ts +41 -0
- package/build/src/generated/grpc/channelz/v1/Server.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Server.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ServerData.d.ts +53 -0
- package/build/src/generated/grpc/channelz/v1/ServerData.js +4 -0
- package/build/src/generated/grpc/channelz/v1/ServerData.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/ServerRef.d.ts +27 -0
- package/build/src/generated/grpc/channelz/v1/ServerRef.js +4 -0
- package/build/src/generated/grpc/channelz/v1/ServerRef.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Socket.d.ts +66 -0
- package/build/src/generated/grpc/channelz/v1/Socket.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Socket.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketData.d.ts +146 -0
- package/build/src/generated/grpc/channelz/v1/SocketData.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketData.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketOption.d.ts +43 -0
- package/build/src/generated/grpc/channelz/v1/SocketOption.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketOption.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts +29 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts +70 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts +15 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SocketRef.d.ts +27 -0
- package/build/src/generated/grpc/channelz/v1/SocketRef.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SocketRef.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/Subchannel.d.ts +66 -0
- package/build/src/generated/grpc/channelz/v1/Subchannel.js +4 -0
- package/build/src/generated/grpc/channelz/v1/Subchannel.js.map +1 -0
- package/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts +27 -0
- package/build/src/generated/grpc/channelz/v1/SubchannelRef.js +4 -0
- package/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map +1 -0
- package/build/src/http_proxy.d.ts +15 -0
- package/build/src/http_proxy.js +259 -0
- package/build/src/http_proxy.js.map +1 -0
- package/build/src/index.d.ts +76 -0
- package/build/src/index.js +140 -0
- package/build/src/index.js.map +1 -0
- package/build/src/internal-channel.d.ts +118 -0
- package/build/src/internal-channel.js +535 -0
- package/build/src/internal-channel.js.map +1 -0
- package/build/src/load-balancer-child-handler.d.ts +24 -0
- package/build/src/load-balancer-child-handler.js +151 -0
- package/build/src/load-balancer-child-handler.js.map +1 -0
- package/build/src/load-balancer-outlier-detection.d.ts +61 -0
- package/build/src/load-balancer-outlier-detection.js +608 -0
- package/build/src/load-balancer-outlier-detection.js.map +1 -0
- package/build/src/load-balancer-pick-first.d.ts +97 -0
- package/build/src/load-balancer-pick-first.js +393 -0
- package/build/src/load-balancer-pick-first.js.map +1 -0
- package/build/src/load-balancer-round-robin.d.ts +21 -0
- package/build/src/load-balancer-round-robin.js +174 -0
- package/build/src/load-balancer-round-robin.js.map +1 -0
- package/build/src/load-balancer.d.ts +97 -0
- package/build/src/load-balancer.js +102 -0
- package/build/src/load-balancer.js.map +1 -0
- package/build/src/load-balancing-call.d.ts +44 -0
- package/build/src/load-balancing-call.js +269 -0
- package/build/src/load-balancing-call.js.map +1 -0
- package/build/src/logging.d.ts +7 -0
- package/build/src/logging.js +114 -0
- package/build/src/logging.js.map +1 -0
- package/build/src/make-client.d.ts +71 -0
- package/build/src/make-client.js +143 -0
- package/build/src/make-client.js.map +1 -0
- package/build/src/max-message-size-filter.d.ts +15 -0
- package/build/src/max-message-size-filter.js +86 -0
- package/build/src/max-message-size-filter.js.map +1 -0
- package/build/src/metadata.d.ts +84 -0
- package/build/src/metadata.js +249 -0
- package/build/src/metadata.js.map +1 -0
- package/build/src/object-stream.d.ts +27 -0
- package/build/src/object-stream.js +19 -0
- package/build/src/object-stream.js.map +1 -0
- package/build/src/picker.d.ts +91 -0
- package/build/src/picker.js +78 -0
- package/build/src/picker.js.map +1 -0
- package/build/src/resolver-dns.d.ts +13 -0
- package/build/src/resolver-dns.js +328 -0
- package/build/src/resolver-dns.js.map +1 -0
- package/build/src/resolver-ip.d.ts +1 -0
- package/build/src/resolver-ip.js +104 -0
- package/build/src/resolver-ip.js.map +1 -0
- package/build/src/resolver-uds.d.ts +1 -0
- package/build/src/resolver-uds.js +50 -0
- package/build/src/resolver-uds.js.map +1 -0
- package/build/src/resolver.d.ts +105 -0
- package/build/src/resolver.js +87 -0
- package/build/src/resolver.js.map +1 -0
- package/build/src/resolving-call.d.ts +44 -0
- package/build/src/resolving-call.js +273 -0
- package/build/src/resolving-call.js.map +1 -0
- package/build/src/resolving-load-balancer.d.ts +67 -0
- package/build/src/resolving-load-balancer.js +304 -0
- package/build/src/resolving-load-balancer.js.map +1 -0
- package/build/src/retrying-call.d.ts +94 -0
- package/build/src/retrying-call.js +639 -0
- package/build/src/retrying-call.js.map +1 -0
- package/build/src/server-call.d.ts +159 -0
- package/build/src/server-call.js +700 -0
- package/build/src/server-call.js.map +1 -0
- package/build/src/server-credentials.d.ts +11 -0
- package/build/src/server-credentials.js +81 -0
- package/build/src/server-credentials.js.map +1 -0
- package/build/src/server.d.ts +56 -0
- package/build/src/server.js +892 -0
- package/build/src/server.js.map +1 -0
- package/build/src/service-config.d.ts +56 -0
- package/build/src/service-config.js +416 -0
- package/build/src/service-config.js.map +1 -0
- package/build/src/status-builder.d.ts +28 -0
- package/build/src/status-builder.js +68 -0
- package/build/src/status-builder.js.map +1 -0
- package/build/src/stream-decoder.d.ts +10 -0
- package/build/src/stream-decoder.js +96 -0
- package/build/src/stream-decoder.js.map +1 -0
- package/build/src/subchannel-address.d.ts +18 -0
- package/build/src/subchannel-address.js +65 -0
- package/build/src/subchannel-address.js.map +1 -0
- package/build/src/subchannel-call.d.ts +61 -0
- package/build/src/subchannel-call.js +461 -0
- package/build/src/subchannel-call.js.map +1 -0
- package/build/src/subchannel-interface.d.ts +49 -0
- package/build/src/subchannel-interface.js +59 -0
- package/build/src/subchannel-interface.js.map +1 -0
- package/build/src/subchannel-pool.d.ts +40 -0
- package/build/src/subchannel-pool.js +137 -0
- package/build/src/subchannel-pool.js.map +1 -0
- package/build/src/subchannel.d.ts +119 -0
- package/build/src/subchannel.js +353 -0
- package/build/src/subchannel.js.map +1 -0
- package/build/src/tls-helpers.d.ts +2 -0
- package/build/src/tls-helpers.js +34 -0
- package/build/src/tls-helpers.js.map +1 -0
- package/build/src/transport.d.ts +130 -0
- package/build/src/transport.js +640 -0
- package/build/src/transport.js.map +1 -0
- package/build/src/uri-parser.d.ts +12 -0
- package/build/src/uri-parser.js +110 -0
- package/build/src/uri-parser.js.map +1 -0
- package/package.json +85 -0
- package/proto/channelz.proto +564 -0
- package/src/admin.ts +45 -0
- package/src/backoff-timeout.ts +196 -0
- package/src/call-credentials.ts +226 -0
- package/src/call-interface.ts +173 -0
- package/src/call-number.ts +22 -0
- package/src/call.ts +200 -0
- package/src/channel-credentials.ts +267 -0
- package/src/channel-options.ts +119 -0
- package/src/channel.ts +174 -0
- package/src/channelz.ts +886 -0
- package/src/client-interceptors.ts +577 -0
- package/src/client.ts +715 -0
- package/src/compression-algorithms.ts +22 -0
- package/src/compression-filter.ts +315 -0
- package/src/connectivity-state.ts +24 -0
- package/src/constants.ts +66 -0
- package/src/control-plane-status.ts +43 -0
- package/src/deadline.ts +95 -0
- package/src/duration.ts +36 -0
- package/src/error.ts +37 -0
- package/src/events.ts +26 -0
- package/src/experimental.ts +48 -0
- package/src/filter-stack.ts +100 -0
- package/src/filter.ts +63 -0
- package/src/generated/channelz.ts +73 -0
- package/src/generated/google/protobuf/Any.ts +13 -0
- package/src/generated/google/protobuf/BoolValue.ts +10 -0
- package/src/generated/google/protobuf/BytesValue.ts +10 -0
- package/src/generated/google/protobuf/DoubleValue.ts +10 -0
- package/src/generated/google/protobuf/Duration.ts +13 -0
- package/src/generated/google/protobuf/FloatValue.ts +10 -0
- package/src/generated/google/protobuf/Int32Value.ts +10 -0
- package/src/generated/google/protobuf/Int64Value.ts +11 -0
- package/src/generated/google/protobuf/StringValue.ts +10 -0
- package/src/generated/google/protobuf/Timestamp.ts +13 -0
- package/src/generated/google/protobuf/UInt32Value.ts +10 -0
- package/src/generated/google/protobuf/UInt64Value.ts +11 -0
- package/src/generated/grpc/channelz/v1/Address.ts +89 -0
- package/src/generated/grpc/channelz/v1/Channel.ts +68 -0
- package/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts +45 -0
- package/src/generated/grpc/channelz/v1/ChannelData.ts +76 -0
- package/src/generated/grpc/channelz/v1/ChannelRef.ts +31 -0
- package/src/generated/grpc/channelz/v1/ChannelTrace.ts +45 -0
- package/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts +91 -0
- package/src/generated/grpc/channelz/v1/Channelz.ts +178 -0
- package/src/generated/grpc/channelz/v1/GetChannelRequest.ts +17 -0
- package/src/generated/grpc/channelz/v1/GetChannelResponse.ts +19 -0
- package/src/generated/grpc/channelz/v1/GetServerRequest.ts +17 -0
- package/src/generated/grpc/channelz/v1/GetServerResponse.ts +19 -0
- package/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts +39 -0
- package/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts +33 -0
- package/src/generated/grpc/channelz/v1/GetServersRequest.ts +37 -0
- package/src/generated/grpc/channelz/v1/GetServersResponse.ts +33 -0
- package/src/generated/grpc/channelz/v1/GetSocketRequest.ts +29 -0
- package/src/generated/grpc/channelz/v1/GetSocketResponse.ts +19 -0
- package/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts +17 -0
- package/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts +19 -0
- package/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts +37 -0
- package/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts +33 -0
- package/src/generated/grpc/channelz/v1/Security.ts +87 -0
- package/src/generated/grpc/channelz/v1/Server.ts +45 -0
- package/src/generated/grpc/channelz/v1/ServerData.ts +57 -0
- package/src/generated/grpc/channelz/v1/ServerRef.ts +31 -0
- package/src/generated/grpc/channelz/v1/Socket.ts +70 -0
- package/src/generated/grpc/channelz/v1/SocketData.ts +150 -0
- package/src/generated/grpc/channelz/v1/SocketOption.ts +47 -0
- package/src/generated/grpc/channelz/v1/SocketOptionLinger.ts +33 -0
- package/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts +74 -0
- package/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts +19 -0
- package/src/generated/grpc/channelz/v1/SocketRef.ts +31 -0
- package/src/generated/grpc/channelz/v1/Subchannel.ts +70 -0
- package/src/generated/grpc/channelz/v1/SubchannelRef.ts +31 -0
- package/src/http_proxy.ts +311 -0
- package/src/index.ts +284 -0
- package/src/internal-channel.ts +832 -0
- package/src/load-balancer-child-handler.ts +169 -0
- package/src/load-balancer-outlier-detection.ts +882 -0
- package/src/load-balancer-pick-first.ts +487 -0
- package/src/load-balancer-round-robin.ts +249 -0
- package/src/load-balancer.ts +230 -0
- package/src/load-balancing-call.ts +351 -0
- package/src/logging.ts +123 -0
- package/src/make-client.ts +238 -0
- package/src/max-message-size-filter.ts +88 -0
- package/src/metadata.ts +298 -0
- package/src/object-stream.ts +66 -0
- package/src/picker.ts +146 -0
- package/src/resolver-dns.ts +412 -0
- package/src/resolver-ip.ts +120 -0
- package/src/resolver-uds.ts +63 -0
- package/src/resolver.ts +180 -0
- package/src/resolving-call.ts +331 -0
- package/src/resolving-load-balancer.ts +403 -0
- package/src/retrying-call.ts +821 -0
- package/src/server-call.ts +1033 -0
- package/src/server-credentials.ts +108 -0
- package/src/server.ts +1300 -0
- package/src/service-config.ts +542 -0
- package/src/status-builder.ts +80 -0
- package/src/stream-decoder.ts +105 -0
- package/src/subchannel-address.ts +88 -0
- package/src/subchannel-call.ts +539 -0
- package/src/subchannel-interface.ts +97 -0
- package/src/subchannel-pool.ts +176 -0
- package/src/subchannel.ts +482 -0
- package/src/tls-helpers.ts +35 -0
- package/src/transport.ts +824 -0
- package/src/uri-parser.ts +114 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright {yyyy} {name of copyright owner}
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Pure JavaScript gRPC Client
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
Node 12 is recommended. The exact set of compatible Node versions can be found in the `engines` field of the `package.json` file.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @grpc/grpc-js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Documentation
|
|
12
|
+
|
|
13
|
+
Documentation specifically for the `@grpc/grpc-js` package is currently not available. However, [documentation is available for the `grpc` package](https://grpc.github.io/grpc/node/grpc.html), and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below.
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Clients
|
|
18
|
+
- Automatic reconnection
|
|
19
|
+
- Servers
|
|
20
|
+
- Streaming
|
|
21
|
+
- Metadata
|
|
22
|
+
- Partial compression support: clients can compress and decompress messages, and servers can decompress request messages
|
|
23
|
+
- Pick first and round robin load balancing policies
|
|
24
|
+
- Client Interceptors
|
|
25
|
+
- Connection Keepalives
|
|
26
|
+
- HTTP Connect support (proxies)
|
|
27
|
+
|
|
28
|
+
If you need a feature from the `grpc` package that is not provided by the `@grpc/grpc-js`, please file a feature request with that information.
|
|
29
|
+
|
|
30
|
+
This library does not directly handle `.proto` files. To use `.proto` files with this library we recommend using the `@grpc/proto-loader` package.
|
|
31
|
+
|
|
32
|
+
## Migrating from [`grpc`](https://www.npmjs.com/package/grpc)
|
|
33
|
+
|
|
34
|
+
`@grpc/grpc-js` is almost a drop-in replacement for `grpc`, but you may need to make a few code changes to use it:
|
|
35
|
+
|
|
36
|
+
- If you are currently loading `.proto` files using `grpc.load`, that function is not available in this library. You should instead load your `.proto` files using `@grpc/proto-loader` and load the resulting package definition objects into `@grpc/grpc-js` using `grpc.loadPackageDefinition`.
|
|
37
|
+
- If you are currently loading packages generated by `grpc-tools`, you should instead generate your files using the `generate_package_definition` option in `grpc-tools`, then load the object exported by the generated file into `@grpc/grpc-js` using `grpc.loadPackageDefinition`.
|
|
38
|
+
- If you have a server and you are using `Server#bind` to bind ports, you will need to use `Server#bindAsync` instead.
|
|
39
|
+
- If you are using any channel options supported in `grpc` but not supported in `@grpc/grpc-js`, you may need to adjust your code to handle the different behavior. Refer to [the list of supported options](#supported-channel-options) below.
|
|
40
|
+
- Refer to the [detailed package comparison](https://github.com/grpc/grpc-node/blob/master/PACKAGE-COMPARISON.md) for more details on the differences between `grpc` and `@grpc/grpc-js`.
|
|
41
|
+
|
|
42
|
+
## Supported Channel Options
|
|
43
|
+
Many channel arguments supported in `grpc` are not supported in `@grpc/grpc-js`. The channel arguments supported by `@grpc/grpc-js` are:
|
|
44
|
+
- `grpc.ssl_target_name_override`
|
|
45
|
+
- `grpc.primary_user_agent`
|
|
46
|
+
- `grpc.secondary_user_agent`
|
|
47
|
+
- `grpc.default_authority`
|
|
48
|
+
- `grpc.keepalive_time_ms`
|
|
49
|
+
- `grpc.keepalive_timeout_ms`
|
|
50
|
+
- `grpc.keepalive_permit_without_calls`
|
|
51
|
+
- `grpc.service_config`
|
|
52
|
+
- `grpc.max_concurrent_streams`
|
|
53
|
+
- `grpc.initial_reconnect_backoff_ms`
|
|
54
|
+
- `grpc.max_reconnect_backoff_ms`
|
|
55
|
+
- `grpc.use_local_subchannel_pool`
|
|
56
|
+
- `grpc.max_send_message_length`
|
|
57
|
+
- `grpc.max_receive_message_length`
|
|
58
|
+
- `grpc.enable_http_proxy`
|
|
59
|
+
- `grpc.default_compression_algorithm`
|
|
60
|
+
- `grpc.enable_channelz`
|
|
61
|
+
- `grpc.dns_min_time_between_resolutions_ms`
|
|
62
|
+
- `grpc.enable_retries`
|
|
63
|
+
- `grpc.per_rpc_retry_buffer_size`
|
|
64
|
+
- `grpc.retry_buffer_size`
|
|
65
|
+
- `grpc.service_config_disable_resolution`
|
|
66
|
+
- `grpc.client_idle_timeout_ms`
|
|
67
|
+
- `grpc-node.max_session_memory`
|
|
68
|
+
- `grpc-node.tls_enable_trace`
|
|
69
|
+
- `channelOverride`
|
|
70
|
+
- `channelFactoryOverride`
|
|
71
|
+
|
|
72
|
+
## Some Notes on API Guarantees
|
|
73
|
+
|
|
74
|
+
The public API of this library follows semantic versioning, with some caveats:
|
|
75
|
+
|
|
76
|
+
- Some methods are prefixed with an underscore. These methods are internal and should not be considered part of the public API.
|
|
77
|
+
- The class `Call` is only exposed due to limitations of TypeScript. It should not be considered part of the public API.
|
|
78
|
+
- In general, any API that is exposed by this library but is not exposed by the `grpc` library is likely an error and should not be considered part of the public API.
|
|
79
|
+
- The `grpc.experimental` namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServiceDefinition } from './make-client';
|
|
2
|
+
import { Server, UntypedServiceImplementation } from './server';
|
|
3
|
+
interface GetServiceDefinition {
|
|
4
|
+
(): ServiceDefinition;
|
|
5
|
+
}
|
|
6
|
+
interface GetHandlers {
|
|
7
|
+
(): UntypedServiceImplementation;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerAdminService(getServiceDefinition: GetServiceDefinition, getHandlers: GetHandlers): void;
|
|
10
|
+
export declare function addAdminServicesToServer(server: Server): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2021 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
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.registerAdminService = registerAdminService;
|
|
20
|
+
exports.addAdminServicesToServer = addAdminServicesToServer;
|
|
21
|
+
const registeredAdminServices = [];
|
|
22
|
+
function registerAdminService(getServiceDefinition, getHandlers) {
|
|
23
|
+
registeredAdminServices.push({ getServiceDefinition, getHandlers });
|
|
24
|
+
}
|
|
25
|
+
function addAdminServicesToServer(server) {
|
|
26
|
+
for (const { getServiceDefinition, getHandlers } of registeredAdminServices) {
|
|
27
|
+
server.addService(getServiceDefinition(), getHandlers());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/admin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAkBH,oDAKC;AAED,4DAIC;AAhBD,MAAM,uBAAuB,GAGvB,EAAE,CAAC;AAET,SAAgB,oBAAoB,CAClC,oBAA0C,EAC1C,WAAwB;IAExB,uBAAuB,CAAC,IAAI,CAAC,EAAE,oBAAoB,EAAE,WAAW,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,SAAgB,wBAAwB,CAAC,MAAc;IACrD,KAAK,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,IAAI,uBAAuB,EAAE,CAAC;QAC5E,MAAM,CAAC,UAAU,CAAC,oBAAoB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export interface BackoffOptions {
|
|
2
|
+
initialDelay?: number;
|
|
3
|
+
multiplier?: number;
|
|
4
|
+
jitter?: number;
|
|
5
|
+
maxDelay?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class BackoffTimeout {
|
|
8
|
+
private callback;
|
|
9
|
+
/**
|
|
10
|
+
* The delay time at the start, and after each reset.
|
|
11
|
+
*/
|
|
12
|
+
private readonly initialDelay;
|
|
13
|
+
/**
|
|
14
|
+
* The exponential backoff multiplier.
|
|
15
|
+
*/
|
|
16
|
+
private readonly multiplier;
|
|
17
|
+
/**
|
|
18
|
+
* The maximum delay time
|
|
19
|
+
*/
|
|
20
|
+
private readonly maxDelay;
|
|
21
|
+
/**
|
|
22
|
+
* The maximum fraction by which the delay time can randomly vary after
|
|
23
|
+
* applying the multiplier.
|
|
24
|
+
*/
|
|
25
|
+
private readonly jitter;
|
|
26
|
+
/**
|
|
27
|
+
* The delay time for the next time the timer runs.
|
|
28
|
+
*/
|
|
29
|
+
private nextDelay;
|
|
30
|
+
/**
|
|
31
|
+
* The handle of the underlying timer. If running is false, this value refers
|
|
32
|
+
* to an object representing a timer that has ended, but it can still be
|
|
33
|
+
* interacted with without error.
|
|
34
|
+
*/
|
|
35
|
+
private timerId;
|
|
36
|
+
/**
|
|
37
|
+
* Indicates whether the timer is currently running.
|
|
38
|
+
*/
|
|
39
|
+
private running;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates whether the timer should keep the Node process running if no
|
|
42
|
+
* other async operation is doing so.
|
|
43
|
+
*/
|
|
44
|
+
private hasRef;
|
|
45
|
+
/**
|
|
46
|
+
* The time that the currently running timer was started. Only valid if
|
|
47
|
+
* running is true.
|
|
48
|
+
*/
|
|
49
|
+
private startTime;
|
|
50
|
+
/**
|
|
51
|
+
* The approximate time that the currently running timer will end. Only valid
|
|
52
|
+
* if running is true.
|
|
53
|
+
*/
|
|
54
|
+
private endTime;
|
|
55
|
+
constructor(callback: () => void, options?: BackoffOptions);
|
|
56
|
+
private runTimer;
|
|
57
|
+
/**
|
|
58
|
+
* Call the callback after the current amount of delay time
|
|
59
|
+
*/
|
|
60
|
+
runOnce(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Stop the timer. The callback will not be called until `runOnce` is called
|
|
63
|
+
* again.
|
|
64
|
+
*/
|
|
65
|
+
stop(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Reset the delay time to its initial value. If the timer is still running,
|
|
68
|
+
* retroactively apply that reset to the current timer.
|
|
69
|
+
*/
|
|
70
|
+
reset(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Check whether the timer is currently running.
|
|
73
|
+
*/
|
|
74
|
+
isRunning(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Set that while the timer is running, it should keep the Node process
|
|
77
|
+
* running.
|
|
78
|
+
*/
|
|
79
|
+
ref(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Set that while the timer is running, it should not keep the Node process
|
|
82
|
+
* running.
|
|
83
|
+
*/
|
|
84
|
+
unref(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Get the approximate timestamp of when the timer will fire. Only valid if
|
|
87
|
+
* this.isRunning() is true.
|
|
88
|
+
*/
|
|
89
|
+
getEndTime(): Date;
|
|
90
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2019 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
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.BackoffTimeout = void 0;
|
|
20
|
+
const INITIAL_BACKOFF_MS = 1000;
|
|
21
|
+
const BACKOFF_MULTIPLIER = 1.6;
|
|
22
|
+
const MAX_BACKOFF_MS = 120000;
|
|
23
|
+
const BACKOFF_JITTER = 0.2;
|
|
24
|
+
/**
|
|
25
|
+
* Get a number uniformly at random in the range [min, max)
|
|
26
|
+
* @param min
|
|
27
|
+
* @param max
|
|
28
|
+
*/
|
|
29
|
+
function uniformRandom(min, max) {
|
|
30
|
+
return Math.random() * (max - min) + min;
|
|
31
|
+
}
|
|
32
|
+
class BackoffTimeout {
|
|
33
|
+
constructor(callback, options) {
|
|
34
|
+
this.callback = callback;
|
|
35
|
+
/**
|
|
36
|
+
* The delay time at the start, and after each reset.
|
|
37
|
+
*/
|
|
38
|
+
this.initialDelay = INITIAL_BACKOFF_MS;
|
|
39
|
+
/**
|
|
40
|
+
* The exponential backoff multiplier.
|
|
41
|
+
*/
|
|
42
|
+
this.multiplier = BACKOFF_MULTIPLIER;
|
|
43
|
+
/**
|
|
44
|
+
* The maximum delay time
|
|
45
|
+
*/
|
|
46
|
+
this.maxDelay = MAX_BACKOFF_MS;
|
|
47
|
+
/**
|
|
48
|
+
* The maximum fraction by which the delay time can randomly vary after
|
|
49
|
+
* applying the multiplier.
|
|
50
|
+
*/
|
|
51
|
+
this.jitter = BACKOFF_JITTER;
|
|
52
|
+
/**
|
|
53
|
+
* Indicates whether the timer is currently running.
|
|
54
|
+
*/
|
|
55
|
+
this.running = false;
|
|
56
|
+
/**
|
|
57
|
+
* Indicates whether the timer should keep the Node process running if no
|
|
58
|
+
* other async operation is doing so.
|
|
59
|
+
*/
|
|
60
|
+
this.hasRef = true;
|
|
61
|
+
/**
|
|
62
|
+
* The time that the currently running timer was started. Only valid if
|
|
63
|
+
* running is true.
|
|
64
|
+
*/
|
|
65
|
+
this.startTime = new Date();
|
|
66
|
+
/**
|
|
67
|
+
* The approximate time that the currently running timer will end. Only valid
|
|
68
|
+
* if running is true.
|
|
69
|
+
*/
|
|
70
|
+
this.endTime = new Date();
|
|
71
|
+
if (options) {
|
|
72
|
+
if (options.initialDelay) {
|
|
73
|
+
this.initialDelay = options.initialDelay;
|
|
74
|
+
}
|
|
75
|
+
if (options.multiplier) {
|
|
76
|
+
this.multiplier = options.multiplier;
|
|
77
|
+
}
|
|
78
|
+
if (options.jitter) {
|
|
79
|
+
this.jitter = options.jitter;
|
|
80
|
+
}
|
|
81
|
+
if (options.maxDelay) {
|
|
82
|
+
this.maxDelay = options.maxDelay;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
this.nextDelay = this.initialDelay;
|
|
86
|
+
this.timerId = setTimeout(() => { }, 0);
|
|
87
|
+
clearTimeout(this.timerId);
|
|
88
|
+
}
|
|
89
|
+
runTimer(delay) {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
this.endTime = this.startTime;
|
|
92
|
+
this.endTime.setMilliseconds(this.endTime.getMilliseconds() + this.nextDelay);
|
|
93
|
+
clearTimeout(this.timerId);
|
|
94
|
+
this.timerId = setTimeout(() => {
|
|
95
|
+
this.callback();
|
|
96
|
+
this.running = false;
|
|
97
|
+
}, delay);
|
|
98
|
+
if (!this.hasRef) {
|
|
99
|
+
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Call the callback after the current amount of delay time
|
|
104
|
+
*/
|
|
105
|
+
runOnce() {
|
|
106
|
+
this.running = true;
|
|
107
|
+
this.startTime = new Date();
|
|
108
|
+
this.runTimer(this.nextDelay);
|
|
109
|
+
const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay);
|
|
110
|
+
const jitterMagnitude = nextBackoff * this.jitter;
|
|
111
|
+
this.nextDelay =
|
|
112
|
+
nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Stop the timer. The callback will not be called until `runOnce` is called
|
|
116
|
+
* again.
|
|
117
|
+
*/
|
|
118
|
+
stop() {
|
|
119
|
+
clearTimeout(this.timerId);
|
|
120
|
+
this.running = false;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Reset the delay time to its initial value. If the timer is still running,
|
|
124
|
+
* retroactively apply that reset to the current timer.
|
|
125
|
+
*/
|
|
126
|
+
reset() {
|
|
127
|
+
this.nextDelay = this.initialDelay;
|
|
128
|
+
if (this.running) {
|
|
129
|
+
const now = new Date();
|
|
130
|
+
const newEndTime = this.startTime;
|
|
131
|
+
newEndTime.setMilliseconds(newEndTime.getMilliseconds() + this.nextDelay);
|
|
132
|
+
clearTimeout(this.timerId);
|
|
133
|
+
if (now < newEndTime) {
|
|
134
|
+
this.runTimer(newEndTime.getTime() - now.getTime());
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.running = false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Check whether the timer is currently running.
|
|
143
|
+
*/
|
|
144
|
+
isRunning() {
|
|
145
|
+
return this.running;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Set that while the timer is running, it should keep the Node process
|
|
149
|
+
* running.
|
|
150
|
+
*/
|
|
151
|
+
ref() {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
this.hasRef = true;
|
|
154
|
+
(_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Set that while the timer is running, it should not keep the Node process
|
|
158
|
+
* running.
|
|
159
|
+
*/
|
|
160
|
+
unref() {
|
|
161
|
+
var _a, _b;
|
|
162
|
+
this.hasRef = false;
|
|
163
|
+
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get the approximate timestamp of when the timer will fire. Only valid if
|
|
167
|
+
* this.isRunning() is true.
|
|
168
|
+
*/
|
|
169
|
+
getEndTime() {
|
|
170
|
+
return this.endTime;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.BackoffTimeout = BackoffTimeout;
|
|
174
|
+
//# sourceMappingURL=backoff-timeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backoff-timeout.js","sourceRoot":"","sources":["../../src/backoff-timeout.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Metadata } from './metadata';
|
|
2
|
+
export interface CallMetadataOptions {
|
|
3
|
+
service_url: string;
|
|
4
|
+
}
|
|
5
|
+
export type CallMetadataGenerator = (options: CallMetadataOptions, cb: (err: Error | null, metadata?: Metadata) => void) => void;
|
|
6
|
+
export interface OldOAuth2Client {
|
|
7
|
+
getRequestMetadata: (url: string, callback: (err: Error | null, headers?: {
|
|
8
|
+
[index: string]: string;
|
|
9
|
+
}) => void) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface CurrentOAuth2Client {
|
|
12
|
+
getRequestHeaders: (url?: string) => Promise<{
|
|
13
|
+
[index: string]: string;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
export type OAuth2Client = OldOAuth2Client | CurrentOAuth2Client;
|
|
17
|
+
/**
|
|
18
|
+
* A class that represents a generic method of adding authentication-related
|
|
19
|
+
* metadata on a per-request basis.
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class CallCredentials {
|
|
22
|
+
/**
|
|
23
|
+
* Asynchronously generates a new Metadata object.
|
|
24
|
+
* @param options Options used in generating the Metadata object.
|
|
25
|
+
*/
|
|
26
|
+
abstract generateMetadata(options: CallMetadataOptions): Promise<Metadata>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new CallCredentials object from properties of both this and
|
|
29
|
+
* another CallCredentials object. This object's metadata generator will be
|
|
30
|
+
* called first.
|
|
31
|
+
* @param callCredentials The other CallCredentials object.
|
|
32
|
+
*/
|
|
33
|
+
abstract compose(callCredentials: CallCredentials): CallCredentials;
|
|
34
|
+
/**
|
|
35
|
+
* Check whether two call credentials objects are equal. Separate
|
|
36
|
+
* SingleCallCredentials with identical metadata generator functions are
|
|
37
|
+
* equal.
|
|
38
|
+
* @param other The other CallCredentials object to compare with.
|
|
39
|
+
*/
|
|
40
|
+
abstract _equals(other: CallCredentials): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new CallCredentials object from a given function that generates
|
|
43
|
+
* Metadata objects.
|
|
44
|
+
* @param metadataGenerator A function that accepts a set of options, and
|
|
45
|
+
* generates a Metadata object based on these options, which is passed back
|
|
46
|
+
* to the caller via a supplied (err, metadata) callback.
|
|
47
|
+
*/
|
|
48
|
+
static createFromMetadataGenerator(metadataGenerator: CallMetadataGenerator): CallCredentials;
|
|
49
|
+
/**
|
|
50
|
+
* Create a gRPC credential from a Google credential object.
|
|
51
|
+
* @param googleCredentials The authentication client to use.
|
|
52
|
+
* @return The resulting CallCredentials object.
|
|
53
|
+
*/
|
|
54
|
+
static createFromGoogleCredential(googleCredentials: OAuth2Client): CallCredentials;
|
|
55
|
+
static createEmpty(): CallCredentials;
|
|
56
|
+
}
|