├── AUTHORS ├── test ├── data │ └── README ├── client-libraries-integration │ ├── libs │ │ └── .gitkeep │ ├── .gitignore │ ├── package.json │ ├── repositories.json │ └── init.sh ├── package.json ├── kokoro.sh ├── fixtures │ ├── js_js.js │ ├── js_native.js │ ├── native_js.js │ └── native_native.js ├── kokoro.bat ├── distrib │ ├── distrib-test.js │ └── run-distrib-test.sh └── kokoro │ ├── linux.cfg │ ├── macos.cfg │ ├── windows.cfg │ ├── xds-v3-interop.cfg │ ├── linux_aarch64.cfg │ ├── psm-light.cfg │ └── xds_k8s_lb.cfg ├── packages ├── grpc-js │ ├── test │ │ ├── fixtures │ │ │ ├── README │ │ │ ├── server1.key │ │ │ ├── ca.pem │ │ │ └── server1.pem │ │ └── generated │ │ │ ├── Response.ts │ │ │ ├── EchoMessage.ts │ │ │ ├── Request.ts │ │ │ ├── echo_service.ts │ │ │ └── test_service.ts │ ├── prettier.config.js │ ├── src │ │ ├── generated │ │ │ ├── google │ │ │ │ └── protobuf │ │ │ │ │ ├── BoolValue.ts │ │ │ │ │ ├── Int32Value.ts │ │ │ │ │ ├── StringValue.ts │ │ │ │ │ ├── UInt32Value.ts │ │ │ │ │ ├── FloatValue.ts │ │ │ │ │ ├── DoubleValue.ts │ │ │ │ │ ├── BytesValue.ts │ │ │ │ │ ├── Int64Value.ts │ │ │ │ │ ├── UInt64Value.ts │ │ │ │ │ ├── Any.ts │ │ │ │ │ ├── Duration.ts │ │ │ │ │ ├── Timestamp.ts │ │ │ │ │ ├── FileDescriptorSet.ts │ │ │ │ │ ├── SymbolVisibility.ts │ │ │ │ │ ├── OneofDescriptorProto.ts │ │ │ │ │ ├── EnumValueDescriptorProto.ts │ │ │ │ │ ├── MethodDescriptorProto.ts │ │ │ │ │ ├── SourceCodeInfo.ts │ │ │ │ │ ├── ServiceOptions.ts │ │ │ │ │ ├── OneofOptions.ts │ │ │ │ │ └── ServiceDescriptorProto.ts │ │ │ ├── grpc │ │ │ │ └── channelz │ │ │ │ │ └── v1 │ │ │ │ │ ├── GetServerRequest.ts │ │ │ │ │ ├── GetChannelRequest.ts │ │ │ │ │ ├── GetSubchannelRequest.ts │ │ │ │ │ ├── GetServerResponse.ts │ │ │ │ │ ├── GetSocketResponse.ts │ │ │ │ │ ├── GetChannelResponse.ts │ │ │ │ │ ├── SocketOptionTimeout.ts │ │ │ │ │ ├── GetSubchannelResponse.ts │ │ │ │ │ ├── SocketRef.ts │ │ │ │ │ ├── ChannelRef.ts │ │ │ │ │ ├── ServerRef.ts │ │ │ │ │ ├── SubchannelRef.ts │ │ │ │ │ ├── GetSocketRequest.ts │ │ │ │ │ └── SocketOptionLinger.ts │ │ │ └── validate │ │ │ │ ├── BoolRules.ts │ │ │ │ ├── KnownRegex.ts │ │ │ │ └── MessageRules.ts │ │ ├── call-number.ts │ │ ├── compression-algorithms.ts │ │ ├── environment.ts │ │ ├── connectivity-state.ts │ │ └── auth-context.ts │ ├── apache-notice.md │ └── tsconfig.json ├── grpc-js-xds │ ├── .eslintrc.json │ ├── .prettierrc.js │ ├── src │ │ ├── generated │ │ │ ├── google │ │ │ │ ├── protobuf │ │ │ │ │ ├── Empty.ts │ │ │ │ │ ├── BoolValue.ts │ │ │ │ │ ├── Int32Value.ts │ │ │ │ │ ├── StringValue.ts │ │ │ │ │ ├── UInt32Value.ts │ │ │ │ │ ├── DoubleValue.ts │ │ │ │ │ ├── FloatValue.ts │ │ │ │ │ ├── BytesValue.ts │ │ │ │ │ ├── Int64Value.ts │ │ │ │ │ ├── UInt64Value.ts │ │ │ │ │ ├── NullValue.ts │ │ │ │ │ ├── Duration.ts │ │ │ │ │ ├── Any.ts │ │ │ │ │ ├── Timestamp.ts │ │ │ │ │ ├── ListValue.ts │ │ │ │ │ ├── Struct.ts │ │ │ │ │ ├── FileDescriptorSet.ts │ │ │ │ │ ├── SymbolVisibility.ts │ │ │ │ │ ├── OneofDescriptorProto.ts │ │ │ │ │ ├── EnumValueDescriptorProto.ts │ │ │ │ │ ├── MethodDescriptorProto.ts │ │ │ │ │ ├── SourceCodeInfo.ts │ │ │ │ │ ├── ServiceOptions.ts │ │ │ │ │ ├── OneofOptions.ts │ │ │ │ │ └── ServiceDescriptorProto.ts │ │ │ │ └── api │ │ │ │ │ └── CustomHttpPattern.ts │ │ │ ├── envoy │ │ │ │ ├── config │ │ │ │ │ ├── listener │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ ├── ActiveRawUdpListenerConfig.ts │ │ │ │ │ │ │ ├── ApiListenerManager.ts │ │ │ │ │ │ │ ├── ListenerManager.ts │ │ │ │ │ │ │ ├── ListenerCollection.ts │ │ │ │ │ │ │ └── ValidationListenerManager.ts │ │ │ │ │ ├── core │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ ├── TcpProtocolOptions.ts │ │ │ │ │ │ │ ├── KeyValue.ts │ │ │ │ │ │ │ ├── SocketOptionsOverride.ts │ │ │ │ │ │ │ ├── HeaderMap.ts │ │ │ │ │ │ │ ├── JsonFormatOptions.ts │ │ │ │ │ │ │ ├── HealthStatusSet.ts │ │ │ │ │ │ │ ├── WatchedDirectory.ts │ │ │ │ │ │ │ ├── AggregatedConfigSource.ts │ │ │ │ │ │ │ ├── QueryParameter.ts │ │ │ │ │ │ │ ├── GrpcProtocolOptions.ts │ │ │ │ │ │ │ ├── RuntimeUInt32.ts │ │ │ │ │ │ │ ├── RuntimeDouble.ts │ │ │ │ │ │ │ ├── ControlPlane.ts │ │ │ │ │ │ │ ├── RequestMethod.ts │ │ │ │ │ │ │ ├── Pipe.ts │ │ │ │ │ │ │ ├── DnsResolverOptions.ts │ │ │ │ │ │ │ ├── RuntimePercent.ts │ │ │ │ │ │ │ └── EventServiceConfig.ts │ │ │ │ │ ├── route │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ ├── NonForwardingAction.ts │ │ │ │ │ │ │ ├── FilterAction.ts │ │ │ │ │ │ │ └── Vhds.ts │ │ │ │ │ ├── accesslog │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ ├── TraceableFilter.ts │ │ │ │ │ │ │ ├── NotHealthCheckFilter.ts │ │ │ │ │ │ │ ├── StatusCodeFilter.ts │ │ │ │ │ │ │ ├── OrFilter.ts │ │ │ │ │ │ │ ├── AndFilter.ts │ │ │ │ │ │ │ └── HeaderFilter.ts │ │ │ │ │ └── cluster │ │ │ │ │ │ └── v3 │ │ │ │ │ │ └── ClusterCollection.ts │ │ │ │ ├── type │ │ │ │ │ ├── v3 │ │ │ │ │ │ ├── Percent.ts │ │ │ │ │ │ ├── Int32Range.ts │ │ │ │ │ │ ├── DoubleRange.ts │ │ │ │ │ │ ├── SemanticVersion.ts │ │ │ │ │ │ ├── Int64Range.ts │ │ │ │ │ │ └── CodecClientType.ts │ │ │ │ │ └── matcher │ │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── OrMatcher.ts │ │ │ │ │ │ ├── ListStringMatcher.ts │ │ │ │ │ │ └── ListMatcher.ts │ │ │ │ ├── service │ │ │ │ │ ├── discovery │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── AdsDummy.ts │ │ │ │ │ └── status │ │ │ │ │ │ └── v3 │ │ │ │ │ │ └── ClientStatusResponse.ts │ │ │ │ ├── extensions │ │ │ │ │ ├── filters │ │ │ │ │ │ ├── network │ │ │ │ │ │ │ └── http_connection_manager │ │ │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ │ ├── RequestIDExtension.ts │ │ │ │ │ │ │ │ └── ScopedRouteConfigurationsList.ts │ │ │ │ │ │ └── http │ │ │ │ │ │ │ └── rbac │ │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── RBACPerRoute.ts │ │ │ │ │ ├── transport_sockets │ │ │ │ │ │ └── tls │ │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── GenericSecret.ts │ │ │ │ │ ├── load_balancing_policies │ │ │ │ │ │ └── pick_first │ │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── PickFirst.ts │ │ │ │ │ └── clusters │ │ │ │ │ │ └── aggregate │ │ │ │ │ │ └── v3 │ │ │ │ │ │ └── ClusterConfig.ts │ │ │ │ └── data │ │ │ │ │ └── accesslog │ │ │ │ │ └── v3 │ │ │ │ │ └── ConnectionProperties.ts │ │ │ ├── xds │ │ │ │ ├── core │ │ │ │ │ └── v3 │ │ │ │ │ │ └── Authority.ts │ │ │ │ ├── annotations │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── FileStatusAnnotation.ts │ │ │ │ │ │ ├── FieldStatusAnnotation.ts │ │ │ │ │ │ ├── MessageStatusAnnotation.ts │ │ │ │ │ │ └── StatusAnnotation.ts │ │ │ │ └── type │ │ │ │ │ └── matcher │ │ │ │ │ └── v3 │ │ │ │ │ └── ListStringMatcher.ts │ │ │ ├── udpa │ │ │ │ └── annotations │ │ │ │ │ ├── MigrateAnnotation.ts │ │ │ │ │ ├── FileMigrateAnnotation.ts │ │ │ │ │ ├── VersioningAnnotation.ts │ │ │ │ │ ├── FieldMigrateAnnotation.ts │ │ │ │ │ ├── StatusAnnotation.ts │ │ │ │ │ └── FieldSecurityAnnotation.ts │ │ │ └── validate │ │ │ │ ├── BoolRules.ts │ │ │ │ ├── KnownRegex.ts │ │ │ │ └── MessageRules.ts │ │ └── protobuf-any.ts │ ├── test │ │ ├── generated │ │ │ └── grpc │ │ │ │ └── testing │ │ │ │ ├── SimpleRequest.ts │ │ │ │ ├── SimpleResponse.ts │ │ │ │ ├── StringValue.ts │ │ │ │ ├── ResponseParams.ts │ │ │ │ ├── DebugInfo.ts │ │ │ │ ├── ErrorStatus.ts │ │ │ │ ├── EchoRequest.ts │ │ │ │ ├── EchoResponse.ts │ │ │ │ └── NoRpcService.ts │ │ ├── fixtures │ │ │ ├── server1.key │ │ │ └── ca.pem │ │ └── test-register.ts │ ├── tsconfig.json │ ├── interop │ │ └── generated │ │ │ └── grpc │ │ │ └── testing │ │ │ ├── ClientConfigureResponse.ts │ │ │ ├── LoadBalancerAccumulatedStatsRequest.ts │ │ │ ├── ReconnectParams.ts │ │ │ ├── StreamingInputCallResponse.ts │ │ │ ├── EchoStatus.ts │ │ │ ├── PayloadType.ts │ │ │ ├── ReconnectInfo.ts │ │ │ ├── BoolValue.ts │ │ │ ├── LoadBalancerStatsRequest.ts │ │ │ ├── StreamingOutputCallResponse.ts │ │ │ ├── Empty.ts │ │ │ └── Payload.ts │ ├── scripts │ │ └── xds-v3.sh │ └── proto │ │ └── grpc │ │ └── testing │ │ ├── simple_messages.proto │ │ └── empty.proto ├── grpc-reflection │ ├── src │ │ ├── index.ts │ │ ├── implementations │ │ │ └── common │ │ │ │ ├── interfaces.ts │ │ │ │ ├── utils.ts │ │ │ │ └── constants.ts │ │ └── generated │ │ │ └── grpc │ │ │ └── reflection │ │ │ ├── v1 │ │ │ ├── ErrorResponse.ts │ │ │ ├── ServiceResponse.ts │ │ │ ├── ExtensionRequest.ts │ │ │ ├── ExtensionNumberResponse.ts │ │ │ ├── ServerReflection.ts │ │ │ └── ListServiceResponse.ts │ │ │ └── v1alpha │ │ │ ├── ErrorResponse.ts │ │ │ ├── ServiceResponse.ts │ │ │ ├── ExtensionRequest.ts │ │ │ ├── ExtensionNumberResponse.ts │ │ │ └── ServerReflection.ts │ ├── images │ │ └── example.gif │ ├── proto │ │ └── sample │ │ │ ├── vendor │ │ │ ├── dependency │ │ │ │ └── dependency.proto │ │ │ ├── vendor.proto │ │ │ └── common.proto │ │ │ ├── unscoped.proto │ │ │ └── sample.proto │ ├── tsconfig.json │ └── test │ │ └── test-utils.ts ├── grpc-tools │ ├── .gitignore │ └── index.js ├── proto-loader │ ├── prettier.config.js │ ├── test_protos │ │ ├── rpc.desc.bin │ │ ├── rpc.proto │ │ ├── enums.proto │ │ ├── well_known.proto │ │ └── messages.proto │ ├── tslint.json │ ├── golden-generated │ │ └── google │ │ │ ├── protobuf │ │ │ ├── Empty.ts │ │ │ ├── Duration.ts │ │ │ ├── Timestamp.ts │ │ │ ├── Any.ts │ │ │ ├── FileDescriptorSet.ts │ │ │ ├── OneofDescriptorProto.ts │ │ │ ├── SymbolVisibility.ts │ │ │ ├── EnumValueDescriptorProto.ts │ │ │ ├── OneofOptions.ts │ │ │ ├── MethodDescriptorProto.ts │ │ │ ├── SourceCodeInfo.ts │ │ │ ├── ServiceDescriptorProto.ts │ │ │ ├── ServiceOptions.ts │ │ │ └── EnumOptions.ts │ │ │ ├── showcase │ │ │ └── v1beta1 │ │ │ │ ├── WaitResponse.ts │ │ │ │ ├── BlockResponse.ts │ │ │ │ ├── WaitMetadata.ts │ │ │ │ ├── Severity.ts │ │ │ │ ├── PagedExpandRequest.ts │ │ │ │ ├── EchoResponse.ts │ │ │ │ ├── PagedExpandResponse.ts │ │ │ │ └── ExpandRequest.ts │ │ │ ├── longrunning │ │ │ ├── GetOperationRequest.ts │ │ │ ├── DeleteOperationRequest.ts │ │ │ └── CancelOperationRequest.ts │ │ │ └── api │ │ │ └── CustomHttpPattern.ts │ └── tsconfig.json ├── grpc-health-check │ ├── src │ │ └── generated │ │ │ └── grpc │ │ │ └── health │ │ │ └── v1 │ │ │ ├── HealthListRequest.ts │ │ │ ├── HealthCheckRequest.ts │ │ │ └── HealthListResponse.ts │ ├── test │ │ └── generated │ │ │ └── grpc │ │ │ └── health │ │ │ └── v1 │ │ │ ├── HealthListRequest.ts │ │ │ ├── HealthCheckRequest.ts │ │ │ └── HealthListResponse.ts │ └── tsconfig.json └── grpc-native-core │ ├── README.md │ └── deps │ └── grpc │ └── tools │ └── run_tests │ └── interop │ └── with_nvm.sh ├── .github ├── lock.yml └── ISSUE_TEMPLATE │ └── feature_request.md ├── tsconfig.json ├── .gitattributes ├── .editorconfig ├── GOVERNANCE.md ├── CODE-OF-CONDUCT.md ├── .istanbul.yml ├── SECURITY.md ├── examples ├── protos │ └── README.md ├── routeguide │ ├── README.md │ └── static_codegen │ │ └── README.md ├── metadata │ └── README.md ├── keepalive │ └── README.md ├── package.json ├── cancellation │ └── README.md ├── error_handling │ └── README.md ├── helloworld │ └── static_codegen │ │ └── README.md ├── reflection │ └── server.js └── debugging │ └── README.md ├── CONTRIBUTING.md ├── .gitignore ├── setup_interop.sh ├── setup_interop_purejs.sh ├── tools └── release │ └── native │ └── Dockerfile └── doc └── compression.md /AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /test/data/README: -------------------------------------------------------------------------------- 1 | CONFIRMEDTESTKEY 2 | -------------------------------------------------------------------------------- /test/client-libraries-integration/libs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/grpc-js/test/fixtures/README: -------------------------------------------------------------------------------- 1 | CONFIRMEDTESTKEY 2 | -------------------------------------------------------------------------------- /test/client-libraries-integration/.gitignore: -------------------------------------------------------------------------------- 1 | libs/nodejs-*/ -------------------------------------------------------------------------------- /.github/lock.yml: -------------------------------------------------------------------------------- 1 | daysUntilLock: 90 2 | lockComment: false 3 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/gts/" 3 | } 4 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/index.ts: -------------------------------------------------------------------------------- 1 | export { ReflectionService } from './service'; 2 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require('gts/.prettierrc.json') 3 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": [ 4 | "es2015" 5 | ] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | packages/grpc-js-xds/src/generated/** linguist-generated 2 | packages/grpc-js-xds/interop/generated/** linguist-generated 3 | -------------------------------------------------------------------------------- /packages/grpc-reflection/images/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/grpc-node/master/packages/grpc-reflection/images/example.gif -------------------------------------------------------------------------------- /packages/grpc-tools/.gitignore: -------------------------------------------------------------------------------- 1 | CMakeFiles/ 2 | cmake_install.cmake 3 | CMakeCache.txt 4 | Makefile 5 | grpc_node_plugin 6 | protoc 7 | deps/protobuf 8 | -------------------------------------------------------------------------------- /packages/proto-loader/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | proseWrap: 'always', 3 | singleQuote: true, 4 | trailingComma: 'es5', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/proto-loader/test_protos/rpc.desc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/postmanlabs/grpc-node/master/packages/proto-loader/test_protos/rpc.desc.bin -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | [**] 3 | end_of_line = LF 4 | indent_style = space 5 | indent_size = 2 6 | insert_final_newline = true 7 | tab_width = 8 8 | -------------------------------------------------------------------------------- /GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). 2 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Community Code of Conduct 2 | 3 | gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /packages/proto-loader/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "gts/tslint.json", 3 | "linterOptions": { 4 | "exclude": [ 5 | "**/*.json" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.istanbul.yml: -------------------------------------------------------------------------------- 1 | reporting: 2 | watermarks: 3 | statements: [80, 95] 4 | lines: [80, 95] 5 | functions: [80, 95] 6 | branches: [80, 95] 7 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/Empty.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface IEmpty { 5 | } 6 | 7 | export interface OEmpty { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Empty.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface Empty { 5 | } 6 | 7 | export interface Empty__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-js/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | proseWrap: 'always', 3 | singleQuote: true, 4 | trailingComma: 'es5', 5 | bracketSpacing: true, 6 | arrowParens: 'avoid', 7 | }; 8 | -------------------------------------------------------------------------------- /packages/grpc-reflection/proto/sample/vendor/dependency/dependency.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package vendor.dependency; 4 | 5 | message DependentMessage { 6 | optional string something = 1; 7 | } 8 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | For information on gRPC Security Policy and reporting potentional security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md). 4 | -------------------------------------------------------------------------------- /examples/protos/README.md: -------------------------------------------------------------------------------- 1 | # Example protos 2 | 3 | ## Contents 4 | 5 | - [helloworld.proto] 6 | - The simple example used in the overview. 7 | - [route_guide.proto] 8 | - An example service described in detail in the tutorial. 9 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/SimpleRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/simple_messages.proto 2 | 3 | 4 | export interface SimpleRequest { 5 | } 6 | 7 | export interface SimpleRequest__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/SimpleResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/simple_messages.proto 2 | 3 | 4 | export interface SimpleResponse { 5 | } 6 | 7 | export interface SimpleResponse__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-health-check/src/generated/grpc/health/v1/HealthListRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | 4 | export interface HealthListRequest { 5 | } 6 | 7 | export interface HealthListRequest__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-health-check/test/generated/grpc/health/v1/HealthListRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | 4 | export interface HealthListRequest { 5 | } 6 | 7 | export interface HealthListRequest__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-reflection/proto/sample/unscoped.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | message TopLevelMessage { 4 | bool value = 1; 5 | } 6 | 7 | message ProcessRequest { 8 | string key = 1; 9 | TopLevelMessage message = 2; 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/BoolValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface BoolValue { 5 | 'value'?: (boolean); 6 | } 7 | 8 | export interface BoolValue__Output { 9 | 'value': (boolean); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/Int32Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface Int32Value { 5 | 'value'?: (number); 6 | } 7 | 8 | export interface Int32Value__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/BoolValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface BoolValue { 5 | 'value'?: (boolean); 6 | } 7 | 8 | export interface BoolValue__Output { 9 | 'value': (boolean); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Int32Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface Int32Value { 5 | 'value'?: (number); 6 | } 7 | 8 | export interface Int32Value__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/StringValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface StringValue { 5 | 'value'?: (string); 6 | } 7 | 8 | export interface StringValue__Output { 9 | 'value': (string); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/UInt32Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface UInt32Value { 5 | 'value'?: (number); 6 | } 7 | 8 | export interface UInt32Value__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/StringValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface StringValue { 5 | 'value'?: (string); 6 | } 7 | 8 | export interface StringValue__Output { 9 | 'value': (string); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/UInt32Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface UInt32Value { 5 | 'value'?: (number); 6 | } 7 | 8 | export interface UInt32Value__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/FloatValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface FloatValue { 5 | 'value'?: (number | string); 6 | } 7 | 8 | export interface FloatValue__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-reflection/proto/sample/vendor/vendor.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package vendor; 4 | 5 | import "./common.proto"; 6 | import "./dependency/dependency.proto"; 7 | 8 | extend CommonMessage { 9 | optional bool ext = 101; 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/DoubleValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface DoubleValue { 5 | 'value'?: (number | string); 6 | } 7 | 8 | export interface DoubleValue__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/FloatValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface FloatValue { 5 | 'value'?: (number | string); 6 | } 7 | 8 | export interface FloatValue__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/DoubleValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface DoubleValue { 5 | 'value'?: (number | string); 6 | } 7 | 8 | export interface DoubleValue__Output { 9 | 'value': (number); 10 | } 11 | -------------------------------------------------------------------------------- /examples/routeguide/README.md: -------------------------------------------------------------------------------- 1 | # gRPC Basics: Node.js sample code 2 | 3 | The files in this folder are the samples used in [gRPC Basics: Node.js][], a detailed tutorial for using gRPC in Node.js. 4 | 5 | [gRPC Basics: Node.js]:https://grpc.io/docs/languages/node/basics 6 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/BytesValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface BytesValue { 5 | 'value'?: (Buffer | Uint8Array | string); 6 | } 7 | 8 | export interface BytesValue__Output { 9 | 'value': (Buffer); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/BytesValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface BytesValue { 5 | 'value'?: (Buffer | Uint8Array | string); 6 | } 7 | 8 | export interface BytesValue__Output { 9 | 'value': (Buffer); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-native-core/README.md: -------------------------------------------------------------------------------- 1 | The `grpc` npm pacakge previously lived in this package. It has been removed. It now lives in the [`grpc@1.24.x` branch](https://github.com/grpc/grpc-node/tree/grpc%401.24.x/packages/grpc-native-core) where bugfixes are still being applied. -------------------------------------------------------------------------------- /packages/grpc-reflection/src/implementations/common/interfaces.ts: -------------------------------------------------------------------------------- 1 | /** Options to create a reflection server */ 2 | export interface ReflectionServerOptions { 3 | /** whitelist of fully-qualified service names to expose. (Default: expose all) */ 4 | services?: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /examples/metadata/README.md: -------------------------------------------------------------------------------- 1 | # Metadata example 2 | 3 | This example shows how to set and read metadata in RPC headers and trailers. 4 | 5 | ## Start the server 6 | 7 | ``` 8 | node server.js 9 | ``` 10 | 11 | ## Run the client 12 | 13 | ``` 14 | node client.js 15 | ``` 16 | -------------------------------------------------------------------------------- /packages/proto-loader/test_protos/rpc.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | service MyService { 4 | rpc MyMethod (MyRequest) returns (MyResponse); 5 | } 6 | 7 | message MyRequest { 8 | string path = 1; 9 | } 10 | 11 | message MyResponse { 12 | int32 status = 2; 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/StringValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/simple_messages.proto 2 | 3 | 4 | export interface StringValue { 5 | 'message'?: (string); 6 | } 7 | 8 | export interface StringValue__Output { 9 | 'message': (string); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/apache-notice.md: -------------------------------------------------------------------------------- 1 | The following files contain configuration settings that were derived from [the this commit](https://github.com/google/gts/commit/3b9ab6dd59691f77f5c5c632a44c6762ba4ef7c6) in the Google GTS repository: 2 | - .eslintrc 3 | - prettier.config.js 4 | - tsconfig.json 5 | -------------------------------------------------------------------------------- /packages/grpc-health-check/src/generated/grpc/health/v1/HealthCheckRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | 4 | export interface HealthCheckRequest { 5 | 'service'?: (string); 6 | } 7 | 8 | export interface HealthCheckRequest__Output { 9 | 'service': (string); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ActiveRawUdpListenerConfig.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/listener/v3/udp_listener_config.proto 2 | 3 | 4 | export interface ActiveRawUdpListenerConfig { 5 | } 6 | 7 | export interface ActiveRawUdpListenerConfig__Output { 8 | } 9 | -------------------------------------------------------------------------------- /packages/grpc-health-check/test/generated/grpc/health/v1/HealthCheckRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | 4 | export interface HealthCheckRequest { 5 | 'service'?: (string); 6 | } 7 | 8 | export interface HealthCheckRequest__Output { 9 | 'service': (string); 10 | } 11 | -------------------------------------------------------------------------------- /packages/grpc-js/test/generated/Response.ts: -------------------------------------------------------------------------------- 1 | // Original file: test/fixtures/test_service.proto 2 | 3 | 4 | export interface Response { 5 | 'count'?: (number); 6 | 'message'?: (string); 7 | } 8 | 9 | export interface Response__Output { 10 | 'count': (number); 11 | 'message': (string); 12 | } 13 | -------------------------------------------------------------------------------- /packages/grpc-js/test/generated/EchoMessage.ts: -------------------------------------------------------------------------------- 1 | // Original file: test/fixtures/echo_service.proto 2 | 3 | 4 | export interface EchoMessage { 5 | 'value'?: (string); 6 | 'value2'?: (number); 7 | } 8 | 9 | export interface EchoMessage__Output { 10 | 'value': (string); 11 | 'value2': (number); 12 | } 13 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Int64Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface Int64Value { 6 | 'value'?: (number | string | Long); 7 | } 8 | 9 | export interface Int64Value__Output { 10 | 'value': (string); 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/UInt64Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface UInt64Value { 6 | 'value'?: (number | string | Long); 7 | } 8 | 9 | export interface UInt64Value__Output { 10 | 'value': (string); 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/Int64Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface Int64Value { 6 | 'value'?: (number | string | Long); 7 | } 8 | 9 | export interface Int64Value__Output { 10 | 'value': (string); 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/UInt64Value.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface UInt64Value { 6 | 'value'?: (number | string | Long); 7 | } 8 | 9 | export interface UInt64Value__Output { 10 | 'value': (string); 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/NullValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | export const NullValue = { 4 | NULL_VALUE: 'NULL_VALUE', 5 | } as const; 6 | 7 | export type NullValue = 8 | | 'NULL_VALUE' 9 | | 0 10 | 11 | export type NullValue__Output = typeof NullValue[keyof typeof NullValue] 12 | -------------------------------------------------------------------------------- /test/client-libraries-integration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grpc-client-libraries-integration", 3 | "version": "0.0.1", 4 | "description": "", 5 | "dependencies": { 6 | "dot-prop": "^5.2.0", 7 | "google-proto-files": "^0.15.1", 8 | "mocha": "^5.0.4", 9 | "shimmer": "^1.2.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contributions to grpc-node! Please read the gRPC 4 | organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md) 5 | and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding. 6 | -------------------------------------------------------------------------------- /packages/proto-loader/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/gts/tsconfig-google.json", 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "outDir": "build", 6 | "lib": ["es2017"], 7 | "target": "es2017" 8 | }, 9 | "include": [ 10 | "bin/**/*.ts", 11 | "src/**/*.ts", 12 | "test/**/*.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /test/client-libraries-integration/repositories.json: -------------------------------------------------------------------------------- 1 | [ 2 | "nodejs-bigtable", 3 | "nodejs-datastore", 4 | "nodejs-dlp", 5 | "nodejs-firestore", 6 | "nodejs-language", 7 | "nodejs-logging", 8 | "nodejs-monitoring", 9 | "nodejs-pubsub", 10 | "nodejs-spanner", 11 | "nodejs-speech", 12 | "nodejs-video-intelligence", 13 | "nodejs-vision" 14 | ] -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Duration.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface Duration { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface Duration__Output { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/Any.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { AnyExtension } from '@postman/proto-loader'; 4 | 5 | export type Any = AnyExtension | { 6 | type_url: string; 7 | value: Buffer | Uint8Array | string; 8 | } 9 | 10 | export interface Any__Output { 11 | 'type_url': (string); 12 | 'value': (Buffer); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/Duration.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface Duration { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface Duration__Output { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/Timestamp.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface Timestamp { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface Timestamp__Output { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/Duration.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface IDuration { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface ODuration { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/Timestamp.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface ITimestamp { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface OTimestamp { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/TcpProtocolOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/protocol.proto 2 | 3 | 4 | /** 5 | * [#not-implemented-hide:] 6 | */ 7 | export interface TcpProtocolOptions { 8 | } 9 | 10 | /** 11 | * [#not-implemented-hide:] 12 | */ 13 | export interface TcpProtocolOptions__Output { 14 | } 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Any.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { AnyExtension } from '@grpc/proto-loader'; 4 | 5 | export type Any = AnyExtension | { 6 | type_url: string; 7 | value: Buffer | Uint8Array | string; 8 | } 9 | 10 | export interface Any__Output { 11 | 'type_url': (string); 12 | 'value': (Buffer); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Timestamp.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface Timestamp { 6 | 'seconds'?: (number | string | Long); 7 | 'nanos'?: (number); 8 | } 9 | 10 | export interface Timestamp__Output { 11 | 'seconds': (string); 12 | 'nanos': (number); 13 | } 14 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/Any.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { AnyExtension } from '@grpc/proto-loader'; 4 | 5 | export type IAny = AnyExtension | { 6 | type_url: string; 7 | value: Buffer | Uint8Array | string; 8 | } 9 | 10 | export type OAny = AnyExtension | { 11 | type_url: string; 12 | value: Buffer; 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/core/v3/Authority.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/core/v3/authority.proto 2 | 3 | 4 | /** 5 | * xDS authority information. 6 | */ 7 | export interface Authority { 8 | 'name'?: (string); 9 | } 10 | 11 | /** 12 | * xDS authority information. 13 | */ 14 | export interface Authority__Output { 15 | 'name': (string); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/route/v3/NonForwardingAction.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/route/v3/route_components.proto 2 | 3 | 4 | /** 5 | * [#not-implemented-hide:] 6 | */ 7 | export interface NonForwardingAction { 8 | } 9 | 10 | /** 11 | * [#not-implemented-hide:] 12 | */ 13 | export interface NonForwardingAction__Output { 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | build/ 4 | node_modules/ 5 | npm-debug.log 6 | yarn-error.log 7 | yarn.lock 8 | artifacts 9 | 10 | # Emacs temp files 11 | *~ 12 | \#*\# 13 | .\#* 14 | 15 | .nyc_output/ 16 | reports/ 17 | 18 | package-lock.json 19 | pnpm-lock.yaml 20 | 21 | # Test generated files 22 | coverage 23 | 24 | # Node's bash completion file 25 | .node_bash_completion 26 | -------------------------------------------------------------------------------- /examples/keepalive/README.md: -------------------------------------------------------------------------------- 1 | # Keepalive 2 | 3 | This example illustrates how to set up client-side keepalive pings and 4 | server-side keepalive pings and connection age and idleness settings. 5 | 6 | ## Start the server 7 | 8 | ``` 9 | node server.js 10 | ``` 11 | 12 | ## Start the client 13 | 14 | ``` 15 | GRPC_TRACE=transport,keepalive GRPC_VERBOSITY=DEBUG node client.js 16 | ``` 17 | -------------------------------------------------------------------------------- /examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grpc-examples", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "@grpc/proto-loader": "^0.6.0", 6 | "async": "^1.5.2", 7 | "google-protobuf": "^3.0.0", 8 | "@grpc/grpc-js": "^1.10.2", 9 | "@grpc/grpc-js-xds": "^1.10.0", 10 | "@grpc/reflection": "^1.0.0", 11 | "lodash": "^4.6.1", 12 | "minimist": "^1.2.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/gts/tsconfig-google.json", 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "outDir": "build", 6 | "target": "es2020", 7 | "lib": ["es2020"], 8 | "module": "commonjs", 9 | "incremental": true 10 | }, 11 | "include": [ 12 | "src/**/*.ts", 13 | "test/**/*.ts", 14 | "interop/**/*.ts" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/ClientConfigureResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * Response for updating a test client's configuration. 6 | */ 7 | export interface ClientConfigureResponse { 8 | } 9 | 10 | /** 11 | * Response for updating a test client's configuration. 12 | */ 13 | export interface ClientConfigureResponse__Output { 14 | } 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/ListValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; 4 | 5 | export interface ListValue { 6 | 'values'?: (_google_protobuf_Value)[]; 7 | } 8 | 9 | export interface ListValue__Output { 10 | 'values': (_google_protobuf_Value__Output)[]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/Percent.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/percent.proto 2 | 3 | 4 | /** 5 | * Identifies a percentage, in the range [0.0, 100.0]. 6 | */ 7 | export interface Percent { 8 | 'value'?: (number | string); 9 | } 10 | 11 | /** 12 | * Identifies a percentage, in the range [0.0, 100.0]. 13 | */ 14 | export interface Percent__Output { 15 | 'value': (number); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/Struct.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; 4 | 5 | export interface Struct { 6 | 'fields'?: ({[key: string]: _google_protobuf_Value}); 7 | } 8 | 9 | export interface Struct__Output { 10 | 'fields': ({[key: string]: _google_protobuf_Value__Output}); 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/implementations/common/utils.ts: -------------------------------------------------------------------------------- 1 | /** Gets the package scope for a type name 2 | * 3 | * @example scope('grpc.reflection.v1.Type') == 'grpc.reflection.v1' 4 | */ 5 | export const scope = (path: string, separator: string = '.') => { 6 | if (!path.includes(separator) || path === separator) { 7 | return ''; 8 | } 9 | 10 | return path.split(separator).slice(0, -1).join(separator) || separator; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/LoadBalancerAccumulatedStatsRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * Request for retrieving a test client's accumulated stats. 6 | */ 7 | export interface LoadBalancerAccumulatedStatsRequest { 8 | } 9 | 10 | /** 11 | * Request for retrieving a test client's accumulated stats. 12 | */ 13 | export interface LoadBalancerAccumulatedStatsRequest__Output { 14 | } 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/MigrateAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/migrate.proto 2 | 3 | 4 | export interface MigrateAnnotation { 5 | /** 6 | * Rename the message/enum/enum value in next version. 7 | */ 8 | 'rename'?: (string); 9 | } 10 | 11 | export interface MigrateAnnotation__Output { 12 | /** 13 | * Rename the message/enum/enum value in next version. 14 | */ 15 | 'rename': (string); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/ResponseParams.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo_messages.proto 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | export interface ResponseParams { 6 | 'request_deadline'?: (number | string | Long); 7 | 'host'?: (string); 8 | 'peer'?: (string); 9 | } 10 | 11 | export interface ResponseParams__Output { 12 | 'request_deadline': (string); 13 | 'host': (string); 14 | 'peer': (string); 15 | } 16 | -------------------------------------------------------------------------------- /examples/cancellation/README.md: -------------------------------------------------------------------------------- 1 | # Cancellation 2 | 3 | This example shows how clients can cancel in-flight RPCs by cancelling the 4 | call object returned by the method invocation. The client will receive a status 5 | with code `CANCELLED` and the server handler's call object will emit either a 6 | `'cancelled'` event or an `'end'` event. 7 | 8 | ## Start the server 9 | 10 | ``` 11 | node server.js 12 | ``` 13 | 14 | ## Run the client 15 | 16 | ``` 17 | node client.js 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/grpc-js/test/generated/Request.ts: -------------------------------------------------------------------------------- 1 | // Original file: test/fixtures/test_service.proto 2 | 3 | 4 | export interface Request { 5 | 'error'?: (boolean); 6 | 'message'?: (string); 7 | 'errorAfter'?: (number); 8 | 'responseLength'?: (number); 9 | 'code'?: (number); 10 | } 11 | 12 | export interface Request__Output { 13 | 'error': (boolean); 14 | 'message': (string); 15 | 'errorAfter': (number); 16 | 'responseLength': (number); 17 | 'code': (number); 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/DebugInfo.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo_messages.proto 2 | 3 | 4 | /** 5 | * Message to be echoed back serialized in trailer. 6 | */ 7 | export interface DebugInfo { 8 | 'stack_entries'?: (string)[]; 9 | 'detail'?: (string); 10 | } 11 | 12 | /** 13 | * Message to be echoed back serialized in trailer. 14 | */ 15 | export interface DebugInfo__Output { 16 | 'stack_entries': (string)[]; 17 | 'detail': (string); 18 | } 19 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/FileDescriptorSet.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IFileDescriptorProto as I_google_protobuf_FileDescriptorProto, OFileDescriptorProto as O_google_protobuf_FileDescriptorProto } from '../../google/protobuf/FileDescriptorProto'; 4 | 5 | export interface IFileDescriptorSet { 6 | 'file'?: (I_google_protobuf_FileDescriptorProto)[]; 7 | } 8 | 9 | export interface OFileDescriptorSet { 10 | 'file': (O_google_protobuf_FileDescriptorProto)[]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/annotations/v3/FileStatusAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/annotations/v3/status.proto 2 | 3 | 4 | export interface FileStatusAnnotation { 5 | /** 6 | * The entity is work-in-progress and subject to breaking changes. 7 | */ 8 | 'work_in_progress'?: (boolean); 9 | } 10 | 11 | export interface FileStatusAnnotation__Output { 12 | /** 13 | * The entity is work-in-progress and subject to breaking changes. 14 | */ 15 | 'work_in_progress': (boolean); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/annotations/v3/FieldStatusAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/annotations/v3/status.proto 2 | 3 | 4 | export interface FieldStatusAnnotation { 5 | /** 6 | * The entity is work-in-progress and subject to breaking changes. 7 | */ 8 | 'work_in_progress'?: (boolean); 9 | } 10 | 11 | export interface FieldStatusAnnotation__Output { 12 | /** 13 | * The entity is work-in-progress and subject to breaking changes. 14 | */ 15 | 'work_in_progress': (boolean); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/annotations/v3/MessageStatusAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/annotations/v3/status.proto 2 | 3 | 4 | export interface MessageStatusAnnotation { 5 | /** 6 | * The entity is work-in-progress and subject to breaking changes. 7 | */ 8 | 'work_in_progress'?: (boolean); 9 | } 10 | 11 | export interface MessageStatusAnnotation__Output { 12 | /** 13 | * The entity is work-in-progress and subject to breaking changes. 14 | */ 15 | 'work_in_progress': (boolean); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto'; 4 | 5 | export interface FileDescriptorSet { 6 | 'file'?: (_google_protobuf_FileDescriptorProto)[]; 7 | } 8 | 9 | export interface FileDescriptorSet__Output { 10 | 'file': (_google_protobuf_FileDescriptorProto__Output)[]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface GetServerRequest { 6 | /** 7 | * server_id is the identifier of the specific server to get. 8 | */ 9 | 'server_id'?: (number | string | Long); 10 | } 11 | 12 | export interface GetServerRequest__Output { 13 | /** 14 | * server_id is the identifier of the specific server to get. 15 | */ 16 | 'server_id': (string); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/implementations/common/constants.ts: -------------------------------------------------------------------------------- 1 | import * as protoLoader from '@grpc/proto-loader'; 2 | 3 | /** Options to use when loading protobuf files in this repo 4 | * 5 | * @remarks *must* match the proto-loader-gen-types usage in the package.json 6 | * otherwise the generated types may not match the data coming into this service 7 | */ 8 | export const PROTO_LOADER_OPTS: protoLoader.Options = { 9 | longs: String, 10 | enums: String, 11 | bytes: Array, 12 | defaults: true, 13 | oneofs: true 14 | }; 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/FileDescriptorSet.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FileDescriptorProto as _google_protobuf_FileDescriptorProto, FileDescriptorProto__Output as _google_protobuf_FileDescriptorProto__Output } from '../../google/protobuf/FileDescriptorProto'; 4 | 5 | export interface FileDescriptorSet { 6 | 'file'?: (_google_protobuf_FileDescriptorProto)[]; 7 | } 8 | 9 | export interface FileDescriptorSet__Output { 10 | 'file': (_google_protobuf_FileDescriptorProto__Output)[]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface GetChannelRequest { 6 | /** 7 | * channel_id is the identifier of the specific channel to get. 8 | */ 9 | 'channel_id'?: (number | string | Long); 10 | } 11 | 12 | export interface GetChannelRequest__Output { 13 | /** 14 | * channel_id is the identifier of the specific channel to get. 15 | */ 16 | 'channel_id': (string); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-reflection/proto/sample/vendor/common.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | // NOTE: intentionally using the same 'vendor' package here to document the 4 | // file/package merging behavior of the reflection service. 5 | // 6 | // this file should be combined with vendor.proto to a single definition because 7 | // it's under the same 'vendor' package 8 | package vendor; 9 | 10 | message CommonMessage { 11 | optional string common = 1; 12 | optional DependentMessage dependency = 2; 13 | 14 | extensions 100 to 199; 15 | } 16 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/SymbolVisibility.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | export const SymbolVisibility = { 4 | VISIBILITY_UNSET: 'VISIBILITY_UNSET', 5 | VISIBILITY_LOCAL: 'VISIBILITY_LOCAL', 6 | VISIBILITY_EXPORT: 'VISIBILITY_EXPORT', 7 | } as const; 8 | 9 | export type SymbolVisibility = 10 | | 'VISIBILITY_UNSET' 11 | | 0 12 | | 'VISIBILITY_LOCAL' 13 | | 1 14 | | 'VISIBILITY_EXPORT' 15 | | 2 16 | 17 | export type SymbolVisibility__Output = typeof SymbolVisibility[keyof typeof SymbolVisibility] 18 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | export const SymbolVisibility = { 4 | VISIBILITY_UNSET: 'VISIBILITY_UNSET', 5 | VISIBILITY_LOCAL: 'VISIBILITY_LOCAL', 6 | VISIBILITY_EXPORT: 'VISIBILITY_EXPORT', 7 | } as const; 8 | 9 | export type SymbolVisibility = 10 | | 'VISIBILITY_UNSET' 11 | | 0 12 | | 'VISIBILITY_LOCAL' 13 | | 1 14 | | 'VISIBILITY_EXPORT' 15 | | 2 16 | 17 | export type SymbolVisibility__Output = typeof SymbolVisibility[keyof typeof SymbolVisibility] 18 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/OneofDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IOneofOptions as I_google_protobuf_OneofOptions, OOneofOptions as O_google_protobuf_OneofOptions } from '../../google/protobuf/OneofOptions'; 4 | 5 | export interface IOneofDescriptorProto { 6 | 'name'?: (string); 7 | 'options'?: (I_google_protobuf_OneofOptions | null); 8 | } 9 | 10 | export interface OOneofDescriptorProto { 11 | 'name': (string); 12 | 'options': (O_google_protobuf_OneofOptions | null); 13 | } 14 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/SymbolVisibility.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | export const SymbolVisibility = { 4 | VISIBILITY_UNSET: 'VISIBILITY_UNSET', 5 | VISIBILITY_LOCAL: 'VISIBILITY_LOCAL', 6 | VISIBILITY_EXPORT: 'VISIBILITY_EXPORT', 7 | } as const; 8 | 9 | export type ISymbolVisibility = 10 | | 'VISIBILITY_UNSET' 11 | | 0 12 | | 'VISIBILITY_LOCAL' 13 | | 1 14 | | 'VISIBILITY_EXPORT' 15 | | 2 16 | 17 | export type OSymbolVisibility = typeof SymbolVisibility[keyof typeof SymbolVisibility] 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/ErrorStatus.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo_messages.proto 2 | 3 | 4 | /** 5 | * Error status client expects to see. 6 | */ 7 | export interface ErrorStatus { 8 | 'code'?: (number); 9 | 'error_message'?: (string); 10 | 'binary_error_details'?: (string); 11 | } 12 | 13 | /** 14 | * Error status client expects to see. 15 | */ 16 | export interface ErrorStatus__Output { 17 | 'code': (number); 18 | 'error_message': (string); 19 | 'binary_error_details': (string); 20 | } 21 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/WaitResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | 4 | /** 5 | * The result of the Wait operation. 6 | */ 7 | export interface IWaitResponse { 8 | /** 9 | * This content of the result. 10 | */ 11 | 'content'?: (string); 12 | } 13 | 14 | /** 15 | * The result of the Wait operation. 16 | */ 17 | export interface OWaitResponse { 18 | /** 19 | * This content of the result. 20 | */ 21 | 'content': (string); 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions'; 4 | 5 | export interface OneofDescriptorProto { 6 | 'name'?: (string); 7 | 'options'?: (_google_protobuf_OneofOptions | null); 8 | } 9 | 10 | export interface OneofDescriptorProto__Output { 11 | 'name': (string); 12 | 'options': (_google_protobuf_OneofOptions__Output | null); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/OneofDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { OneofOptions as _google_protobuf_OneofOptions, OneofOptions__Output as _google_protobuf_OneofOptions__Output } from '../../google/protobuf/OneofOptions'; 4 | 5 | export interface OneofDescriptorProto { 6 | 'name'?: (string); 7 | 'options'?: (_google_protobuf_OneofOptions | null); 8 | } 9 | 10 | export interface OneofDescriptorProto__Output { 11 | 'name': (string); 12 | 'options': (_google_protobuf_OneofOptions__Output | null); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/EchoRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo_messages.proto 2 | 3 | import type { RequestParams as _grpc_testing_RequestParams, RequestParams__Output as _grpc_testing_RequestParams__Output } from '../../grpc/testing/RequestParams'; 4 | 5 | export interface EchoRequest { 6 | 'message'?: (string); 7 | 'param'?: (_grpc_testing_RequestParams | null); 8 | } 9 | 10 | export interface EchoRequest__Output { 11 | 'message': (string); 12 | 'param': (_grpc_testing_RequestParams__Output | null); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface GetSubchannelRequest { 6 | /** 7 | * subchannel_id is the identifier of the specific subchannel to get. 8 | */ 9 | 'subchannel_id'?: (number | string | Long); 10 | } 11 | 12 | export interface GetSubchannelRequest__Output { 13 | /** 14 | * subchannel_id is the identifier of the specific subchannel to get. 15 | */ 16 | 'subchannel_id': (string); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/ReconnectParams.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * For reconnect interop test only. 6 | * Client tells server what reconnection parameters it used. 7 | */ 8 | export interface ReconnectParams { 9 | 'max_reconnect_backoff_ms'?: (number); 10 | } 11 | 12 | /** 13 | * For reconnect interop test only. 14 | * Client tells server what reconnection parameters it used. 15 | */ 16 | export interface ReconnectParams__Output { 17 | 'max_reconnect_backoff_ms': (number); 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/EchoResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo_messages.proto 2 | 3 | import type { ResponseParams as _grpc_testing_ResponseParams, ResponseParams__Output as _grpc_testing_ResponseParams__Output } from '../../grpc/testing/ResponseParams'; 4 | 5 | export interface EchoResponse { 6 | 'message'?: (string); 7 | 'param'?: (_grpc_testing_ResponseParams | null); 8 | } 9 | 10 | export interface EchoResponse__Output { 11 | 'message': (string); 12 | 'param': (_grpc_testing_ResponseParams__Output | null); 13 | } 14 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/TraceableFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | 4 | /** 5 | * Filters for requests that are traceable. See the tracing overview for more 6 | * information on how a request becomes traceable. 7 | */ 8 | export interface TraceableFilter { 9 | } 10 | 11 | /** 12 | * Filters for requests that are traceable. See the tracing overview for more 13 | * information on how a request becomes traceable. 14 | */ 15 | export interface TraceableFilter__Output { 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/NotHealthCheckFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | 4 | /** 5 | * Filters for requests that are not health check requests. A health check 6 | * request is marked by the health check filter. 7 | */ 8 | export interface NotHealthCheckFilter { 9 | } 10 | 11 | /** 12 | * Filters for requests that are not health check requests. A health check 13 | * request is marked by the health check filter. 14 | */ 15 | export interface NotHealthCheckFilter__Output { 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/FileMigrateAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/migrate.proto 2 | 3 | 4 | export interface FileMigrateAnnotation { 5 | /** 6 | * Move all types in the file to another package, this implies changing proto 7 | * file path. 8 | */ 9 | 'move_to_package'?: (string); 10 | } 11 | 12 | export interface FileMigrateAnnotation__Output { 13 | /** 14 | * Move all types in the file to another package, this implies changing proto 15 | * file path. 16 | */ 17 | 'move_to_package': (string); 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/AdsDummy.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/service/discovery/v3/ads.proto 2 | 3 | 4 | /** 5 | * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing 6 | * services: https://github.com/google/protobuf/issues/4221 7 | */ 8 | export interface AdsDummy { 9 | } 10 | 11 | /** 12 | * [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing 13 | * services: https://github.com/google/protobuf/issues/4221 14 | */ 15 | export interface AdsDummy__Output { 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/route/v3/FilterAction.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/route/v3/route_components.proto 2 | 3 | import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; 4 | 5 | /** 6 | * A filter-defined action type. 7 | */ 8 | export interface FilterAction { 9 | 'action'?: (_google_protobuf_Any | null); 10 | } 11 | 12 | /** 13 | * A filter-defined action type. 14 | */ 15 | export interface FilterAction__Output { 16 | 'action': (_google_protobuf_Any__Output | null); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/KeyValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | export interface KeyValue { 5 | /** 6 | * The key of the key/value pair. 7 | */ 8 | 'key'?: (string); 9 | /** 10 | * The value of the key/value pair. 11 | */ 12 | 'value'?: (Buffer | Uint8Array | string); 13 | } 14 | 15 | export interface KeyValue__Output { 16 | /** 17 | * The key of the key/value pair. 18 | */ 19 | 'key': (string); 20 | /** 21 | * The value of the key/value pair. 22 | */ 23 | 'value': (Buffer); 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOptionsOverride.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/socket_option.proto 2 | 3 | import type { SocketOption as _envoy_config_core_v3_SocketOption, SocketOption__Output as _envoy_config_core_v3_SocketOption__Output } from '../../../../envoy/config/core/v3/SocketOption'; 4 | 5 | export interface SocketOptionsOverride { 6 | 'socket_options'?: (_envoy_config_core_v3_SocketOption)[]; 7 | } 8 | 9 | export interface SocketOptionsOverride__Output { 10 | 'socket_options': (_envoy_config_core_v3_SocketOption__Output)[]; 11 | } 12 | -------------------------------------------------------------------------------- /test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grpc-node-test", 3 | "version": "0.1.0", 4 | "description": "Dummy package for the grpc-node repository tests", 5 | "private": true, 6 | "keywords": [], 7 | "author": { 8 | "name": "Google Inc." 9 | }, 10 | "license": "Apache-2.0", 11 | "contributors": [ 12 | { 13 | "name": "Google Inc." 14 | } 15 | ], 16 | "dependencies": { 17 | "express": "^4.16.3", 18 | "google-auth-library": "^6.1.0", 19 | "lodash": "^4.17.4", 20 | "poisson-process": "^1.0.0" 21 | }, 22 | "optionalDependencies": { 23 | "grpc": "^1.24.2" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/StreamingInputCallResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * Client-streaming response. 6 | */ 7 | export interface StreamingInputCallResponse { 8 | /** 9 | * Aggregated size of payloads received from the client. 10 | */ 11 | 'aggregated_payload_size'?: (number); 12 | } 13 | 14 | /** 15 | * Client-streaming response. 16 | */ 17 | export interface StreamingInputCallResponse__Output { 18 | /** 19 | * Aggregated size of payloads received from the client. 20 | */ 21 | 'aggregated_payload_size': (number); 22 | } 23 | -------------------------------------------------------------------------------- /examples/error_handling/README.md: -------------------------------------------------------------------------------- 1 | # Error Handling 2 | 3 | This example demonstrates basic RPC error handling in gRPC for unary and 4 | streaming response cardinalities. 5 | 6 | ## Start the server 7 | 8 | Run the server, whcih returns an error if the RPC request's `name` field is 9 | empty. 10 | 11 | ``` 12 | node server.js 13 | ``` 14 | 15 | ## Run the client 16 | 17 | Then run the client in another terminal, which makes two requests for each of 18 | unary and streaming responses: one with an empty Name field and one with it 19 | populated with the current username provided by os/user. 20 | 21 | ``` 22 | node client.js 23 | ``` 24 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/EnumValueDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IEnumValueOptions as I_google_protobuf_EnumValueOptions, OEnumValueOptions as O_google_protobuf_EnumValueOptions } from '../../google/protobuf/EnumValueOptions'; 4 | 5 | export interface IEnumValueDescriptorProto { 6 | 'name'?: (string); 7 | 'number'?: (number); 8 | 'options'?: (I_google_protobuf_EnumValueOptions | null); 9 | } 10 | 11 | export interface OEnumValueDescriptorProto { 12 | 'name': (string); 13 | 'number': (number); 14 | 'options': (O_google_protobuf_EnumValueOptions | null); 15 | } 16 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/generated/grpc/testing/NoRpcService.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/echo.proto 2 | 3 | import type * as grpc from '@grpc/grpc-js' 4 | import type { MethodDefinition } from '@grpc/proto-loader' 5 | 6 | /** 7 | * A service without any rpc defined to test coverage. 8 | */ 9 | export interface NoRpcServiceClient extends grpc.Client { 10 | } 11 | 12 | /** 13 | * A service without any rpc defined to test coverage. 14 | */ 15 | export interface NoRpcServiceHandlers extends grpc.UntypedServiceImplementation { 16 | } 17 | 18 | export interface NoRpcServiceDefinition extends grpc.ServiceDefinition { 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/validate/BoolRules.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/protoc-gen-validate/validate/validate.proto 2 | 3 | 4 | /** 5 | * BoolRules describes the constraints applied to `bool` values 6 | */ 7 | export interface BoolRules { 8 | /** 9 | * Const specifies that this field must be exactly the specified value 10 | */ 11 | 'const'?: (boolean); 12 | } 13 | 14 | /** 15 | * BoolRules describes the constraints applied to `bool` values 16 | */ 17 | export interface BoolRules__Output { 18 | /** 19 | * Const specifies that this field must be exactly the specified value 20 | */ 21 | 'const': (boolean); 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/validate/BoolRules.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/protoc-gen-validate/validate/validate.proto 2 | 3 | 4 | /** 5 | * BoolRules describes the constraints applied to `bool` values 6 | */ 7 | export interface BoolRules { 8 | /** 9 | * Const specifies that this field must be exactly the specified value 10 | */ 11 | 'const'?: (boolean); 12 | } 13 | 14 | /** 15 | * BoolRules describes the constraints applied to `bool` values 16 | */ 17 | export interface BoolRules__Output { 18 | /** 19 | * Const specifies that this field must be exactly the specified value 20 | */ 21 | 'const': (boolean); 22 | } 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | ### Is your feature request related to a problem? Please describe. 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | ### Describe the solution you'd like 11 | A clear and concise description of what you want to happen. 12 | 13 | ### Describe alternatives you've considered 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | ### Additional context 17 | Add any other context about the feature request here. 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderMap.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | import type { HeaderValue as _envoy_config_core_v3_HeaderValue, HeaderValue__Output as _envoy_config_core_v3_HeaderValue__Output } from '../../../../envoy/config/core/v3/HeaderValue'; 4 | 5 | /** 6 | * Wrapper for a set of headers. 7 | */ 8 | export interface HeaderMap { 9 | 'headers'?: (_envoy_config_core_v3_HeaderValue)[]; 10 | } 11 | 12 | /** 13 | * Wrapper for a set of headers. 14 | */ 15 | export interface HeaderMap__Output { 16 | 'headers': (_envoy_config_core_v3_HeaderValue__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions'; 4 | 5 | export interface EnumValueDescriptorProto { 6 | 'name'?: (string); 7 | 'number'?: (number); 8 | 'options'?: (_google_protobuf_EnumValueOptions | null); 9 | } 10 | 11 | export interface EnumValueDescriptorProto__Output { 12 | 'name': (string); 13 | 'number': (number); 14 | 'options': (_google_protobuf_EnumValueOptions__Output | null); 15 | } 16 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/EchoStatus.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * A protobuf representation for grpc status. This is used by test 6 | * clients to specify a status that the server should attempt to return. 7 | */ 8 | export interface EchoStatus { 9 | 'code'?: (number); 10 | 'message'?: (string); 11 | } 12 | 13 | /** 14 | * A protobuf representation for grpc status. This is used by test 15 | * clients to specify a status that the server should attempt to return. 16 | */ 17 | export interface EchoStatus__Output { 18 | 'code': (number); 19 | 'message': (string); 20 | } 21 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/EnumValueDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { EnumValueOptions as _google_protobuf_EnumValueOptions, EnumValueOptions__Output as _google_protobuf_EnumValueOptions__Output } from '../../google/protobuf/EnumValueOptions'; 4 | 5 | export interface EnumValueDescriptorProto { 6 | 'name'?: (string); 7 | 'number'?: (number); 8 | 'options'?: (_google_protobuf_EnumValueOptions | null); 9 | } 10 | 11 | export interface EnumValueDescriptorProto__Output { 12 | 'name': (string); 13 | 'number': (number); 14 | 'options': (_google_protobuf_EnumValueOptions__Output | null); 15 | } 16 | -------------------------------------------------------------------------------- /examples/helloworld/static_codegen/README.md: -------------------------------------------------------------------------------- 1 | This is the static code generation variant of the Hello World. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the directory which contains this README.md file): 2 | 3 | ```sh 4 | cd ../protos 5 | npm install -g grpc-tools 6 | grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../helloworld/static_codegen/ --grpc_out=grpc_js:../helloworld/static_codegen/ helloworld.proto 7 | ``` 8 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/BlockResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | 4 | /** 5 | * The response for Block method. 6 | */ 7 | export interface IBlockResponse { 8 | /** 9 | * This content can contain anything, the server will not depend on a value 10 | * here. 11 | */ 12 | 'content'?: (string); 13 | } 14 | 15 | /** 16 | * The response for Block method. 17 | */ 18 | export interface OBlockResponse { 19 | /** 20 | * This content can contain anything, the server will not depend on a value 21 | * here. 22 | */ 23 | 'content': (string); 24 | } 25 | -------------------------------------------------------------------------------- /examples/routeguide/static_codegen/README.md: -------------------------------------------------------------------------------- 1 | This is the static code generation variant of the Route Guide example. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the directory which contains this README.md file): 2 | 3 | ```sh 4 | cd ../protos 5 | npm install -g grpc-tools 6 | grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../routeguide/static_codegen/ --grpc_out=grpc_js:../routeguide/static_codegen/ route_guide.proto 7 | ``` 8 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/JsonFormatOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/substitution_format_string.proto 2 | 3 | 4 | /** 5 | * Optional configuration options to be used with json_format. 6 | */ 7 | export interface JsonFormatOptions { 8 | /** 9 | * The output JSON string properties will be sorted. 10 | */ 11 | 'sort_properties'?: (boolean); 12 | } 13 | 14 | /** 15 | * Optional configuration options to be used with json_format. 16 | */ 17 | export interface JsonFormatOptions__Output { 18 | /** 19 | * The output JSON string properties will be sorted. 20 | */ 21 | 'sort_properties': (boolean); 22 | } 23 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/longrunning/GetOperationRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/googleapis/google/longrunning/operations.proto 2 | 3 | 4 | /** 5 | * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. 6 | */ 7 | export interface IGetOperationRequest { 8 | /** 9 | * The name of the operation resource. 10 | */ 11 | 'name'?: (string); 12 | } 13 | 14 | /** 15 | * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. 16 | */ 17 | export interface OGetOperationRequest { 18 | /** 19 | * The name of the operation resource. 20 | */ 21 | 'name': (string); 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/PayloadType.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | /** 4 | * The type of payload that should be returned. 5 | */ 6 | export const PayloadType = { 7 | /** 8 | * Compressable text format. 9 | */ 10 | COMPRESSABLE: 'COMPRESSABLE', 11 | } as const; 12 | 13 | /** 14 | * The type of payload that should be returned. 15 | */ 16 | export type PayloadType = 17 | /** 18 | * Compressable text format. 19 | */ 20 | | 'COMPRESSABLE' 21 | | 0 22 | 23 | /** 24 | * The type of payload that should be returned. 25 | */ 26 | export type PayloadType__Output = typeof PayloadType[keyof typeof PayloadType] 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/ReconnectInfo.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * For reconnect interop test only. 6 | * Server tells client whether its reconnects are following the spec and the 7 | * reconnect backoffs it saw. 8 | */ 9 | export interface ReconnectInfo { 10 | 'passed'?: (boolean); 11 | 'backoff_ms'?: (number)[]; 12 | } 13 | 14 | /** 15 | * For reconnect interop test only. 16 | * Server tells client whether its reconnects are following the spec and the 17 | * reconnect backoffs it saw. 18 | */ 19 | export interface ReconnectInfo__Output { 20 | 'passed': (boolean); 21 | 'backoff_ms': (number)[]; 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/route/v3/Vhds.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/route/v3/route.proto 2 | 3 | import type { ConfigSource as _envoy_config_core_v3_ConfigSource, ConfigSource__Output as _envoy_config_core_v3_ConfigSource__Output } from '../../../../envoy/config/core/v3/ConfigSource'; 4 | 5 | export interface Vhds { 6 | /** 7 | * Configuration source specifier for VHDS. 8 | */ 9 | 'config_source'?: (_envoy_config_core_v3_ConfigSource | null); 10 | } 11 | 12 | export interface Vhds__Output { 13 | /** 14 | * Configuration source specifier for VHDS. 15 | */ 16 | 'config_source': (_envoy_config_core_v3_ConfigSource__Output | null); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/type/matcher/v3/ListStringMatcher.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/type/matcher/v3/string.proto 2 | 3 | import type { StringMatcher as _xds_type_matcher_v3_StringMatcher, StringMatcher__Output as _xds_type_matcher_v3_StringMatcher__Output } from '../../../../xds/type/matcher/v3/StringMatcher'; 4 | 5 | /** 6 | * Specifies a list of ways to match a string. 7 | */ 8 | export interface ListStringMatcher { 9 | 'patterns'?: (_xds_type_matcher_v3_StringMatcher)[]; 10 | } 11 | 12 | /** 13 | * Specifies a list of ways to match a string. 14 | */ 15 | export interface ListStringMatcher__Output { 16 | 'patterns': (_xds_type_matcher_v3_StringMatcher__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/OrMatcher.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/matcher/v3/value.proto 2 | 3 | import type { ValueMatcher as _envoy_type_matcher_v3_ValueMatcher, ValueMatcher__Output as _envoy_type_matcher_v3_ValueMatcher__Output } from '../../../../envoy/type/matcher/v3/ValueMatcher'; 4 | 5 | /** 6 | * Specifies a list of alternatives for the match. 7 | */ 8 | export interface OrMatcher { 9 | 'value_matchers'?: (_envoy_type_matcher_v3_ValueMatcher)[]; 10 | } 11 | 12 | /** 13 | * Specifies a list of alternatives for the match. 14 | */ 15 | export interface OrMatcher__Output { 16 | 'value_matchers': (_envoy_type_matcher_v3_ValueMatcher__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /test/kokoro.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2017 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 | set -e 17 | cd $(dirname $0)/.. 18 | 19 | ./run-tests.sh 20 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatusSet.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/health_check.proto 2 | 3 | import type { HealthStatus as _envoy_config_core_v3_HealthStatus, HealthStatus__Output as _envoy_config_core_v3_HealthStatus__Output } from '../../../../envoy/config/core/v3/HealthStatus'; 4 | 5 | export interface HealthStatusSet { 6 | /** 7 | * An order-independent set of health status. 8 | */ 9 | 'statuses'?: (_envoy_config_core_v3_HealthStatus)[]; 10 | } 11 | 12 | export interface HealthStatusSet__Output { 13 | /** 14 | * An order-independent set of health status. 15 | */ 16 | 'statuses': (_envoy_config_core_v3_HealthStatus__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/ListStringMatcher.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/matcher/v3/string.proto 2 | 3 | import type { StringMatcher as _envoy_type_matcher_v3_StringMatcher, StringMatcher__Output as _envoy_type_matcher_v3_StringMatcher__Output } from '../../../../envoy/type/matcher/v3/StringMatcher'; 4 | 5 | /** 6 | * Specifies a list of ways to match a string. 7 | */ 8 | export interface ListStringMatcher { 9 | 'patterns'?: (_envoy_type_matcher_v3_StringMatcher)[]; 10 | } 11 | 12 | /** 13 | * Specifies a list of ways to match a string. 14 | */ 15 | export interface ListStringMatcher__Output { 16 | 'patterns': (_envoy_type_matcher_v3_StringMatcher__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /setup_interop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2019 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 | npm install -g node-gyp gulp 17 | npm install 18 | gulp setup 19 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Server as _grpc_channelz_v1_Server, Server__Output as _grpc_channelz_v1_Server__Output } from '../../../grpc/channelz/v1/Server'; 4 | 5 | export interface GetServerResponse { 6 | /** 7 | * The Server that corresponds to the requested server_id. This field 8 | * should be set. 9 | */ 10 | 'server'?: (_grpc_channelz_v1_Server | null); 11 | } 12 | 13 | export interface GetServerResponse__Output { 14 | /** 15 | * The Server that corresponds to the requested server_id. This field 16 | * should be set. 17 | */ 18 | 'server': (_grpc_channelz_v1_Server__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Socket as _grpc_channelz_v1_Socket, Socket__Output as _grpc_channelz_v1_Socket__Output } from '../../../grpc/channelz/v1/Socket'; 4 | 5 | export interface GetSocketResponse { 6 | /** 7 | * The Socket that corresponds to the requested socket_id. This field 8 | * should be set. 9 | */ 10 | 'socket'?: (_grpc_channelz_v1_Socket | null); 11 | } 12 | 13 | export interface GetSocketResponse__Output { 14 | /** 15 | * The Socket that corresponds to the requested socket_id. This field 16 | * should be set. 17 | */ 18 | 'socket': (_grpc_channelz_v1_Socket__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/scripts/xds-v3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 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 | XDS_V3_OPT="--xds_v3_support" $(dirname $0)/xds.sh -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/WatchedDirectory.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | /** 5 | * A directory that is watched for changes, e.g. by inotify on Linux. Move/rename 6 | * events inside this directory trigger the watch. 7 | */ 8 | export interface WatchedDirectory { 9 | /** 10 | * Directory path to watch. 11 | */ 12 | 'path'?: (string); 13 | } 14 | 15 | /** 16 | * A directory that is watched for changes, e.g. by inotify on Linux. Move/rename 17 | * events inside this directory trigger the watch. 18 | */ 19 | export interface WatchedDirectory__Output { 20 | /** 21 | * Directory path to watch. 22 | */ 23 | 'path': (string); 24 | } 25 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/longrunning/DeleteOperationRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/googleapis/google/longrunning/operations.proto 2 | 3 | 4 | /** 5 | * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. 6 | */ 7 | export interface IDeleteOperationRequest { 8 | /** 9 | * The name of the operation resource to be deleted. 10 | */ 11 | 'name'?: (string); 12 | } 13 | 14 | /** 15 | * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. 16 | */ 17 | export interface ODeleteOperationRequest { 18 | /** 19 | * The name of the operation resource to be deleted. 20 | */ 21 | 'name': (string); 22 | } 23 | -------------------------------------------------------------------------------- /setup_interop_purejs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2019 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 | npm install -g gulp 17 | npm install 18 | gulp setupPureJSInterop 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/BoolValue.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | /** 5 | * TODO(dgq): Go back to using well-known types once 6 | * https://github.com/grpc/grpc/issues/6980 has been fixed. 7 | * import "google/protobuf/wrappers.proto"; 8 | */ 9 | export interface BoolValue { 10 | /** 11 | * The bool value. 12 | */ 13 | 'value'?: (boolean); 14 | } 15 | 16 | /** 17 | * TODO(dgq): Go back to using well-known types once 18 | * https://github.com/grpc/grpc/issues/6980 has been fixed. 19 | * import "google/protobuf/wrappers.proto"; 20 | */ 21 | export interface BoolValue__Output { 22 | /** 23 | * The bool value. 24 | */ 25 | 'value': (boolean); 26 | } 27 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/longrunning/CancelOperationRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/googleapis/google/longrunning/operations.proto 2 | 3 | 4 | /** 5 | * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. 6 | */ 7 | export interface ICancelOperationRequest { 8 | /** 9 | * The name of the operation resource to be cancelled. 10 | */ 11 | 'name'?: (string); 12 | } 13 | 14 | /** 15 | * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. 16 | */ 17 | export interface OCancelOperationRequest { 18 | /** 19 | * The name of the operation resource to be cancelled. 20 | */ 21 | 'name': (string); 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Channel as _grpc_channelz_v1_Channel, Channel__Output as _grpc_channelz_v1_Channel__Output } from '../../../grpc/channelz/v1/Channel'; 4 | 5 | export interface GetChannelResponse { 6 | /** 7 | * The Channel that corresponds to the requested channel_id. This field 8 | * should be set. 9 | */ 10 | 'channel'?: (_grpc_channelz_v1_Channel | null); 11 | } 12 | 13 | export interface GetChannelResponse__Output { 14 | /** 15 | * The Channel that corresponds to the requested channel_id. This field 16 | * should be set. 17 | */ 18 | 'channel': (_grpc_channelz_v1_Channel__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ErrorResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | 4 | /** 5 | * The error code and error message sent by the server when an error occurs. 6 | */ 7 | export interface ErrorResponse { 8 | /** 9 | * This field uses the error codes defined in grpc::StatusCode. 10 | */ 11 | 'errorCode'?: (number); 12 | 'errorMessage'?: (string); 13 | } 14 | 15 | /** 16 | * The error code and error message sent by the server when an error occurs. 17 | */ 18 | export interface ErrorResponse__Output { 19 | /** 20 | * This field uses the error codes defined in grpc::StatusCode. 21 | */ 22 | 'errorCode': (number); 23 | 'errorMessage': (string); 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/AggregatedConfigSource.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/config_source.proto 2 | 3 | 4 | /** 5 | * Aggregated Discovery Service (ADS) options. This is currently empty, but when 6 | * set in :ref:`ConfigSource ` can be used to 7 | * specify that ADS is to be used. 8 | */ 9 | export interface AggregatedConfigSource { 10 | } 11 | 12 | /** 13 | * Aggregated Discovery Service (ADS) options. This is currently empty, but when 14 | * set in :ref:`ConfigSource ` can be used to 15 | * specify that ADS is to be used. 16 | */ 17 | export interface AggregatedConfigSource__Output { 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/QueryParameter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | /** 5 | * Query parameter name/value pair. 6 | */ 7 | export interface QueryParameter { 8 | /** 9 | * The key of the query parameter. Case sensitive. 10 | */ 11 | 'key'?: (string); 12 | /** 13 | * The value of the query parameter. 14 | */ 15 | 'value'?: (string); 16 | } 17 | 18 | /** 19 | * Query parameter name/value pair. 20 | */ 21 | export interface QueryParameter__Output { 22 | /** 23 | * The key of the query parameter. Case sensitive. 24 | */ 25 | 'key': (string); 26 | /** 27 | * The value of the query parameter. 28 | */ 29 | 'value': (string); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/LoadBalancerStatsRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | 4 | export interface LoadBalancerStatsRequest { 5 | /** 6 | * Request stats for the next num_rpcs sent by client. 7 | */ 8 | 'num_rpcs'?: (number); 9 | /** 10 | * If num_rpcs have not completed within timeout_sec, return partial results. 11 | */ 12 | 'timeout_sec'?: (number); 13 | } 14 | 15 | export interface LoadBalancerStatsRequest__Output { 16 | /** 17 | * Request stats for the next num_rpcs sent by client. 18 | */ 19 | 'num_rpcs': (number); 20 | /** 21 | * If num_rpcs have not completed within timeout_sec, return partial results. 22 | */ 23 | 'timeout_sec': (number); 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/RequestIDExtension.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto 2 | 3 | import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../../../google/protobuf/Any'; 4 | 5 | export interface RequestIDExtension { 6 | /** 7 | * Request ID extension specific configuration. 8 | */ 9 | 'typed_config'?: (_google_protobuf_Any | null); 10 | } 11 | 12 | export interface RequestIDExtension__Output { 13 | /** 14 | * Request ID extension specific configuration. 15 | */ 16 | 'typed_config': (_google_protobuf_Any__Output | null); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1alpha/ErrorResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1alpha/reflection.proto 2 | 3 | 4 | /** 5 | * The error code and error message sent by the server when an error occurs. 6 | */ 7 | export interface ErrorResponse { 8 | /** 9 | * This field uses the error codes defined in grpc::StatusCode. 10 | */ 11 | 'errorCode'?: (number); 12 | 'errorMessage'?: (string); 13 | } 14 | 15 | /** 16 | * The error code and error message sent by the server when an error occurs. 17 | */ 18 | export interface ErrorResponse__Output { 19 | /** 20 | * This field uses the error codes defined in grpc::StatusCode. 21 | */ 22 | 'errorCode': (number); 23 | 'errorMessage': (string); 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/transport_sockets/tls/v3/GenericSecret.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/transport_sockets/tls/v3/secret.proto 2 | 3 | import type { DataSource as _envoy_config_core_v3_DataSource, DataSource__Output as _envoy_config_core_v3_DataSource__Output } from '../../../../../envoy/config/core/v3/DataSource'; 4 | 5 | export interface GenericSecret { 6 | /** 7 | * Secret of generic type and is available to filters. 8 | */ 9 | 'secret'?: (_envoy_config_core_v3_DataSource | null); 10 | } 11 | 12 | export interface GenericSecret__Output { 13 | /** 14 | * Secret of generic type and is available to filters. 15 | */ 16 | 'secret': (_envoy_config_core_v3_DataSource__Output | null); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/api/CustomHttpPattern.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/googleapis/google/api/http.proto 2 | 3 | 4 | /** 5 | * A custom pattern is used for defining custom HTTP verb. 6 | */ 7 | export interface CustomHttpPattern { 8 | /** 9 | * The name of this custom HTTP verb. 10 | */ 11 | 'kind'?: (string); 12 | /** 13 | * The path matched by this custom verb. 14 | */ 15 | 'path'?: (string); 16 | } 17 | 18 | /** 19 | * A custom pattern is used for defining custom HTTP verb. 20 | */ 21 | export interface CustomHttpPattern__Output { 22 | /** 23 | * The name of this custom HTTP verb. 24 | */ 25 | 'kind': (string); 26 | /** 27 | * The path matched by this custom verb. 28 | */ 29 | 'path': (string); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; 4 | 5 | /** 6 | * For use with SocketOption's additional field. This is primarily used for 7 | * SO_RCVTIMEO and SO_SNDTIMEO 8 | */ 9 | export interface SocketOptionTimeout { 10 | 'duration'?: (_google_protobuf_Duration | null); 11 | } 12 | 13 | /** 14 | * For use with SocketOption's additional field. This is primarily used for 15 | * SO_RCVTIMEO and SO_SNDTIMEO 16 | */ 17 | export interface SocketOptionTimeout__Output { 18 | 'duration': (_google_protobuf_Duration__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/api/CustomHttpPattern.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/googleapis/google/api/http.proto 2 | 3 | 4 | /** 5 | * A custom pattern is used for defining custom HTTP verb. 6 | */ 7 | export interface ICustomHttpPattern { 8 | /** 9 | * The name of this custom HTTP verb. 10 | */ 11 | 'kind'?: (string); 12 | /** 13 | * The path matched by this custom verb. 14 | */ 15 | 'path'?: (string); 16 | } 17 | 18 | /** 19 | * A custom pattern is used for defining custom HTTP verb. 20 | */ 21 | export interface OCustomHttpPattern { 22 | /** 23 | * The name of this custom HTTP verb. 24 | */ 25 | 'kind': (string); 26 | /** 27 | * The path matched by this custom verb. 28 | */ 29 | 'path': (string); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/GrpcProtocolOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/protocol.proto 2 | 3 | import type { Http2ProtocolOptions as _envoy_config_core_v3_Http2ProtocolOptions, Http2ProtocolOptions__Output as _envoy_config_core_v3_Http2ProtocolOptions__Output } from '../../../../envoy/config/core/v3/Http2ProtocolOptions'; 4 | 5 | /** 6 | * [#not-implemented-hide:] 7 | */ 8 | export interface GrpcProtocolOptions { 9 | 'http2_protocol_options'?: (_envoy_config_core_v3_Http2ProtocolOptions | null); 10 | } 11 | 12 | /** 13 | * [#not-implemented-hide:] 14 | */ 15 | export interface GrpcProtocolOptions__Output { 16 | 'http2_protocol_options': (_envoy_config_core_v3_Http2ProtocolOptions__Output | null); 17 | } 18 | -------------------------------------------------------------------------------- /test/fixtures/js_js.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 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 | global._server_implementation = 'js'; 19 | global._client_implementation = 'js'; 20 | -------------------------------------------------------------------------------- /test/fixtures/js_native.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 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 | global._server_implementation = 'js'; 19 | global._client_implementation = 'native'; -------------------------------------------------------------------------------- /test/fixtures/native_js.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 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 | global._server_implementation = 'native'; 19 | global._client_implementation = 'js'; 20 | -------------------------------------------------------------------------------- /test/kokoro.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright 2017 gRPC authors. 2 | @rem 3 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 4 | @rem you may not use this file except in compliance with the License. 5 | @rem You may obtain a copy of the License at 6 | @rem 7 | @rem http://www.apache.org/licenses/LICENSE-2.0 8 | @rem 9 | @rem Unless required by applicable law or agreed to in writing, software 10 | @rem distributed under the License is distributed on an "AS IS" BASIS, 11 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | @rem See the License for the specific language governing permissions and 13 | @rem limitations under the License. 14 | 15 | @echo "Starting Windows test" 16 | 17 | cd /d %~dp0 18 | cd .. 19 | 20 | .\run-tests.bat 21 | -------------------------------------------------------------------------------- /packages/grpc-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowUnreachableCode": false, 4 | "allowUnusedLabels": false, 5 | "declaration": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "noEmitOnError": true, 8 | "noFallthroughCasesInSwitch": true, 9 | "noImplicitReturns": true, 10 | "pretty": true, 11 | "sourceMap": true, 12 | "strict": true, 13 | "lib": ["es2017"], 14 | "outDir": "build", 15 | "target": "es2017", 16 | "module": "commonjs", 17 | "resolveJsonModule": true, 18 | "incremental": true, 19 | "types": ["mocha"], 20 | "noUnusedLocals": true 21 | }, 22 | "include": [ 23 | "src/**/*.ts", 24 | "test/**/*.ts" 25 | ], 26 | "exclude": [ 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/WaitMetadata.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | import type { ITimestamp as I_google_protobuf_Timestamp, OTimestamp as O_google_protobuf_Timestamp } from '../../../google/protobuf/Timestamp'; 4 | 5 | /** 6 | * The metadata for Wait operation. 7 | */ 8 | export interface IWaitMetadata { 9 | /** 10 | * The time that this operation will complete. 11 | */ 12 | 'end_time'?: (I_google_protobuf_Timestamp | null); 13 | } 14 | 15 | /** 16 | * The metadata for Wait operation. 17 | */ 18 | export interface OWaitMetadata { 19 | /** 20 | * The time that this operation will complete. 21 | */ 22 | 'end_time': (O_google_protobuf_Timestamp | null); 23 | } 24 | -------------------------------------------------------------------------------- /test/fixtures/native_native.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 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 | global._server_implementation = 'native'; 19 | global._client_implementation = 'native'; -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Subchannel as _grpc_channelz_v1_Subchannel, Subchannel__Output as _grpc_channelz_v1_Subchannel__Output } from '../../../grpc/channelz/v1/Subchannel'; 4 | 5 | export interface GetSubchannelResponse { 6 | /** 7 | * The Subchannel that corresponds to the requested subchannel_id. This 8 | * field should be set. 9 | */ 10 | 'subchannel'?: (_grpc_channelz_v1_Subchannel | null); 11 | } 12 | 13 | export interface GetSubchannelResponse__Output { 14 | /** 15 | * The Subchannel that corresponds to the requested subchannel_id. This 16 | * field should be set. 17 | */ 18 | 'subchannel': (_grpc_channelz_v1_Subchannel__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-health-check/src/generated/grpc/health/v1/HealthListResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | import type { HealthCheckResponse as _grpc_health_v1_HealthCheckResponse, HealthCheckResponse__Output as _grpc_health_v1_HealthCheckResponse__Output } from '../../../grpc/health/v1/HealthCheckResponse'; 4 | 5 | export interface HealthListResponse { 6 | /** 7 | * statuses contains all the services and their respective status. 8 | */ 9 | 'statuses'?: ({[key: string]: _grpc_health_v1_HealthCheckResponse}); 10 | } 11 | 12 | export interface HealthListResponse__Output { 13 | /** 14 | * statuses contains all the services and their respective status. 15 | */ 16 | 'statuses': ({[key: string]: _grpc_health_v1_HealthCheckResponse__Output}); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-health-check/test/generated/grpc/health/v1/HealthListResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/health/v1/health.proto 2 | 3 | import type { HealthCheckResponse as _grpc_health_v1_HealthCheckResponse, HealthCheckResponse__Output as _grpc_health_v1_HealthCheckResponse__Output } from '../../../grpc/health/v1/HealthCheckResponse'; 4 | 5 | export interface HealthListResponse { 6 | /** 7 | * statuses contains all the services and their respective status. 8 | */ 9 | 'statuses'?: ({[key: string]: _grpc_health_v1_HealthCheckResponse}); 10 | } 11 | 12 | export interface HealthListResponse__Output { 13 | /** 14 | * statuses contains all the services and their respective status. 15 | */ 16 | 'statuses': ({[key: string]: _grpc_health_v1_HealthCheckResponse__Output}); 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-health-check/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowUnreachableCode": false, 4 | "allowUnusedLabels": false, 5 | "declaration": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "noEmitOnError": true, 8 | "noFallthroughCasesInSwitch": true, 9 | "noImplicitReturns": true, 10 | "pretty": true, 11 | "sourceMap": true, 12 | "strict": true, 13 | "lib": ["es2017"], 14 | "outDir": "build", 15 | "target": "es2017", 16 | "module": "commonjs", 17 | "resolveJsonModule": true, 18 | "incremental": true, 19 | "types": ["mocha"], 20 | "noUnusedLocals": true 21 | }, 22 | "include": [ 23 | "src/**/*.ts", 24 | "test/**/*.ts" 25 | ], 26 | "exclude": [ 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ApiListenerManager.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto 2 | 3 | 4 | /** 5 | * A placeholder proto so that users can explicitly configure the API 6 | * Listener Manager via the bootstrap's :ref:`listener_manager `. 7 | * [#not-implemented-hide:] 8 | */ 9 | export interface ApiListenerManager { 10 | } 11 | 12 | /** 13 | * A placeholder proto so that users can explicitly configure the API 14 | * Listener Manager via the bootstrap's :ref:`listener_manager `. 15 | * [#not-implemented-hide:] 16 | */ 17 | export interface ApiListenerManager__Output { 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerManager.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto 2 | 3 | 4 | /** 5 | * A placeholder proto so that users can explicitly configure the standard 6 | * Listener Manager via the bootstrap's :ref:`listener_manager `. 7 | * [#not-implemented-hide:] 8 | */ 9 | export interface ListenerManager { 10 | } 11 | 12 | /** 13 | * A placeholder proto so that users can explicitly configure the standard 14 | * Listener Manager via the bootstrap's :ref:`listener_manager `. 15 | * [#not-implemented-hide:] 16 | */ 17 | export interface ListenerManager__Output { 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-reflection/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowUnreachableCode": false, 4 | "allowUnusedLabels": false, 5 | "declaration": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "noEmitOnError": true, 8 | "noFallthroughCasesInSwitch": true, 9 | "noImplicitReturns": true, 10 | "pretty": true, 11 | "sourceMap": true, 12 | "strict": true, 13 | "lib": ["es2017"], 14 | "outDir": "build", 15 | "target": "es2017", 16 | "module": "commonjs", 17 | "resolveJsonModule": true, 18 | "incremental": true, 19 | "types": ["mocha"], 20 | "noUnusedLocals": true 21 | }, 22 | "include": [ 23 | "src/**/*.ts", 24 | "test/**/*.ts" 25 | ], 26 | "exclude": [ 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/OneofOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IFeatureSet as I_google_protobuf_FeatureSet, OFeatureSet as O_google_protobuf_FeatureSet } from '../../google/protobuf/FeatureSet'; 4 | import type { IUninterpretedOption as I_google_protobuf_UninterpretedOption, OUninterpretedOption as O_google_protobuf_UninterpretedOption } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface IOneofOptions { 7 | 'features'?: (I_google_protobuf_FeatureSet | null); 8 | 'uninterpretedOption'?: (I_google_protobuf_UninterpretedOption)[]; 9 | } 10 | 11 | export interface OOneofOptions { 12 | 'features': (O_google_protobuf_FeatureSet | null); 13 | 'uninterpretedOption': (O_google_protobuf_UninterpretedOption)[]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/service/status/v3/ClientStatusResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/service/status/v3/csds.proto 2 | 3 | import type { ClientConfig as _envoy_service_status_v3_ClientConfig, ClientConfig__Output as _envoy_service_status_v3_ClientConfig__Output } from '../../../../envoy/service/status/v3/ClientConfig'; 4 | 5 | export interface ClientStatusResponse { 6 | /** 7 | * Client configs for the clients specified in the ClientStatusRequest. 8 | */ 9 | 'config'?: (_envoy_service_status_v3_ClientConfig)[]; 10 | } 11 | 12 | export interface ClientStatusResponse__Output { 13 | /** 14 | * Client configs for the clients specified in the ClientStatusRequest. 15 | */ 16 | 'config': (_envoy_service_status_v3_ClientConfig__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/VersioningAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/versioning.proto 2 | 3 | 4 | export interface VersioningAnnotation { 5 | /** 6 | * Track the previous message type. E.g. this message might be 7 | * udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This 8 | * information is consumed by UDPA via proto descriptors. 9 | */ 10 | 'previous_message_type'?: (string); 11 | } 12 | 13 | export interface VersioningAnnotation__Output { 14 | /** 15 | * Track the previous message type. E.g. this message might be 16 | * udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This 17 | * information is consumed by UDPA via proto descriptors. 18 | */ 19 | 'previous_message_type': (string); 20 | } 21 | -------------------------------------------------------------------------------- /packages/grpc-js/src/call-number.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 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 | let nextCallNumber = 0; 19 | 20 | export function getNextCallNumber() { 21 | return nextCallNumber++; 22 | } 23 | -------------------------------------------------------------------------------- /packages/grpc-js/src/compression-algorithms.ts: -------------------------------------------------------------------------------- 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 | export enum CompressionAlgorithms { 19 | identity = 0, 20 | deflate = 1, 21 | gzip = 2, 22 | } 23 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/Severity.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | /** 4 | * A severity enum used to test enum capabilities in GAPIC surfaces 5 | */ 6 | export const Severity = { 7 | UNNECESSARY: 'UNNECESSARY', 8 | NECESSARY: 'NECESSARY', 9 | URGENT: 'URGENT', 10 | CRITICAL: 'CRITICAL', 11 | } as const; 12 | 13 | /** 14 | * A severity enum used to test enum capabilities in GAPIC surfaces 15 | */ 16 | export type ISeverity = 17 | | 'UNNECESSARY' 18 | | 0 19 | | 'NECESSARY' 20 | | 1 21 | | 'URGENT' 22 | | 2 23 | | 'CRITICAL' 24 | | 3 25 | 26 | /** 27 | * A severity enum used to test enum capabilities in GAPIC surfaces 28 | */ 29 | export type OSeverity = typeof Severity[keyof typeof Severity] 30 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/Int32Range.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/range.proto 2 | 3 | 4 | /** 5 | * Specifies the int32 start and end of the range using half-open interval semantics [start, 6 | * end). 7 | */ 8 | export interface Int32Range { 9 | /** 10 | * start of the range (inclusive) 11 | */ 12 | 'start'?: (number); 13 | /** 14 | * end of the range (exclusive) 15 | */ 16 | 'end'?: (number); 17 | } 18 | 19 | /** 20 | * Specifies the int32 start and end of the range using half-open interval semantics [start, 21 | * end). 22 | */ 23 | export interface Int32Range__Output { 24 | /** 25 | * start of the range (inclusive) 26 | */ 27 | 'start': (number); 28 | /** 29 | * end of the range (exclusive) 30 | */ 31 | 'end': (number); 32 | } 33 | -------------------------------------------------------------------------------- /packages/grpc-js/test/generated/echo_service.ts: -------------------------------------------------------------------------------- 1 | import type * as grpc from '../../src/index'; 2 | import type { MessageTypeDefinition } from '@postman/proto-loader'; 3 | 4 | import type { EchoMessage as _EchoMessage, EchoMessage__Output as _EchoMessage__Output } from './EchoMessage'; 5 | import type { EchoServiceClient as _EchoServiceClient, EchoServiceDefinition as _EchoServiceDefinition } from './EchoService'; 6 | 7 | type SubtypeConstructor any, Subtype> = { 8 | new(...args: ConstructorParameters): Subtype; 9 | }; 10 | 11 | export interface ProtoGrpcType { 12 | EchoMessage: MessageTypeDefinition<_EchoMessage, _EchoMessage__Output> 13 | EchoService: SubtypeConstructor & { service: _EchoServiceDefinition } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/MethodDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IMethodOptions as I_google_protobuf_MethodOptions, OMethodOptions as O_google_protobuf_MethodOptions } from '../../google/protobuf/MethodOptions'; 4 | 5 | export interface IMethodDescriptorProto { 6 | 'name'?: (string); 7 | 'inputType'?: (string); 8 | 'outputType'?: (string); 9 | 'options'?: (I_google_protobuf_MethodOptions | null); 10 | 'clientStreaming'?: (boolean); 11 | 'serverStreaming'?: (boolean); 12 | } 13 | 14 | export interface OMethodDescriptorProto { 15 | 'name': (string); 16 | 'inputType': (string); 17 | 'outputType': (string); 18 | 'options': (O_google_protobuf_MethodOptions | null); 19 | 'clientStreaming': (boolean); 20 | 'serverStreaming': (boolean); 21 | } 22 | -------------------------------------------------------------------------------- /examples/reflection/server.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var grpc = require('@grpc/grpc-js'); 3 | var protoLoader = require('@grpc/proto-loader'); 4 | var reflection = require('@grpc/reflection'); 5 | 6 | var PROTO_PATH = path.join(__dirname, '../protos/helloworld.proto'); 7 | 8 | var server = new grpc.Server(); 9 | var packageDefinition = protoLoader.loadSync(PROTO_PATH); 10 | var proto = grpc.loadPackageDefinition(packageDefinition); 11 | var reflection = new reflection.ReflectionService(packageDefinition); 12 | 13 | reflection.addToServer(server); 14 | server.addService(proto.helloworld.Greeter.service, { 15 | sayHello: (call, callback) => { callback(null, { message: 'Hello' }) } 16 | }); 17 | 18 | server.bindAsync('localhost:5000', grpc.ServerCredentials.createInsecure(), () => { 19 | server.start(); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/ClusterCollection.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/cluster/v3/cluster.proto 2 | 3 | import type { CollectionEntry as _xds_core_v3_CollectionEntry, CollectionEntry__Output as _xds_core_v3_CollectionEntry__Output } from '../../../../xds/core/v3/CollectionEntry'; 4 | 5 | /** 6 | * Cluster list collections. Entries are ``Cluster`` resources or references. 7 | * [#not-implemented-hide:] 8 | */ 9 | export interface ClusterCollection { 10 | 'entries'?: (_xds_core_v3_CollectionEntry | null); 11 | } 12 | 13 | /** 14 | * Cluster list collections. Entries are ``Cluster`` resources or references. 15 | * [#not-implemented-hide:] 16 | */ 17 | export interface ClusterCollection__Output { 18 | 'entries': (_xds_core_v3_CollectionEntry__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerCollection.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto 2 | 3 | import type { CollectionEntry as _xds_core_v3_CollectionEntry, CollectionEntry__Output as _xds_core_v3_CollectionEntry__Output } from '../../../../xds/core/v3/CollectionEntry'; 4 | 5 | /** 6 | * Listener list collections. Entries are ``Listener`` resources or references. 7 | * [#not-implemented-hide:] 8 | */ 9 | export interface ListenerCollection { 10 | 'entries'?: (_xds_core_v3_CollectionEntry)[]; 11 | } 12 | 13 | /** 14 | * Listener list collections. Entries are ``Listener`` resources or references. 15 | * [#not-implemented-hide:] 16 | */ 17 | export interface ListenerCollection__Output { 18 | 'entries': (_xds_core_v3_CollectionEntry__Output)[]; 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ServiceResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | 4 | /** 5 | * The information of a single service used by ListServiceResponse to answer 6 | * list_services request. 7 | */ 8 | export interface ServiceResponse { 9 | /** 10 | * Full name of a registered service, including its package name. The format 11 | * is . 12 | */ 13 | 'name'?: (string); 14 | } 15 | 16 | /** 17 | * The information of a single service used by ListServiceResponse to answer 18 | * list_services request. 19 | */ 20 | export interface ServiceResponse__Output { 21 | /** 22 | * Full name of a registered service, including its package name. The format 23 | * is . 24 | */ 25 | 'name': (string); 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js/src/environment.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 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 | export const GRPC_NODE_USE_ALTERNATIVE_RESOLVER = 19 | (process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER ?? 'false') === 'true'; 20 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/SourceCodeInfo.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface I_google_protobuf_SourceCodeInfo_Location { 5 | 'path'?: (number)[]; 6 | 'span'?: (number)[]; 7 | 'leadingComments'?: (string); 8 | 'trailingComments'?: (string); 9 | 'leadingDetachedComments'?: (string)[]; 10 | } 11 | 12 | export interface O_google_protobuf_SourceCodeInfo_Location { 13 | 'path': (number)[]; 14 | 'span': (number)[]; 15 | 'leadingComments': (string); 16 | 'trailingComments': (string); 17 | 'leadingDetachedComments': (string)[]; 18 | } 19 | 20 | export interface ISourceCodeInfo { 21 | 'location'?: (I_google_protobuf_SourceCodeInfo_Location)[]; 22 | } 23 | 24 | export interface OSourceCodeInfo { 25 | 'location': (O_google_protobuf_SourceCodeInfo_Location)[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/StreamingOutputCallResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | import type { Payload as _grpc_testing_Payload, Payload__Output as _grpc_testing_Payload__Output } from '../../grpc/testing/Payload'; 4 | 5 | /** 6 | * Server-streaming response, as configured by the request and parameters. 7 | */ 8 | export interface StreamingOutputCallResponse { 9 | /** 10 | * Payload to increase response size. 11 | */ 12 | 'payload'?: (_grpc_testing_Payload | null); 13 | } 14 | 15 | /** 16 | * Server-streaming response, as configured by the request and parameters. 17 | */ 18 | export interface StreamingOutputCallResponse__Output { 19 | /** 20 | * Payload to increase response size. 21 | */ 22 | 'payload': (_grpc_testing_Payload__Output | null); 23 | } 24 | -------------------------------------------------------------------------------- /packages/grpc-js/src/connectivity-state.ts: -------------------------------------------------------------------------------- 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 | export enum ConnectivityState { 19 | IDLE, 20 | CONNECTING, 21 | READY, 22 | TRANSIENT_FAILURE, 23 | SHUTDOWN, 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions'; 4 | 5 | export interface MethodDescriptorProto { 6 | 'name'?: (string); 7 | 'inputType'?: (string); 8 | 'outputType'?: (string); 9 | 'options'?: (_google_protobuf_MethodOptions | null); 10 | 'clientStreaming'?: (boolean); 11 | 'serverStreaming'?: (boolean); 12 | } 13 | 14 | export interface MethodDescriptorProto__Output { 15 | 'name': (string); 16 | 'inputType': (string); 17 | 'outputType': (string); 18 | 'options': (_google_protobuf_MethodOptions__Output | null); 19 | 'clientStreaming': (boolean); 20 | 'serverStreaming': (boolean); 21 | } 22 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1alpha/ServiceResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1alpha/reflection.proto 2 | 3 | 4 | /** 5 | * The information of a single service used by ListServiceResponse to answer 6 | * list_services request. 7 | */ 8 | export interface ServiceResponse { 9 | /** 10 | * Full name of a registered service, including its package name. The format 11 | * is . 12 | */ 13 | 'name'?: (string); 14 | } 15 | 16 | /** 17 | * The information of a single service used by ListServiceResponse to answer 18 | * list_services request. 19 | */ 20 | export interface ServiceResponse__Output { 21 | /** 22 | * Full name of a registered service, including its package name. The format 23 | * is . 24 | */ 25 | 'name': (string); 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ValidationListenerManager.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto 2 | 3 | 4 | /** 5 | * A placeholder proto so that users can explicitly configure the standard 6 | * Validation Listener Manager via the bootstrap's :ref:`listener_manager `. 7 | * [#not-implemented-hide:] 8 | */ 9 | export interface ValidationListenerManager { 10 | } 11 | 12 | /** 13 | * A placeholder proto so that users can explicitly configure the standard 14 | * Validation Listener Manager via the bootstrap's :ref:`listener_manager `. 15 | * [#not-implemented-hide:] 16 | */ 17 | export interface ValidationListenerManager__Output { 18 | } 19 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/MethodDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { MethodOptions as _google_protobuf_MethodOptions, MethodOptions__Output as _google_protobuf_MethodOptions__Output } from '../../google/protobuf/MethodOptions'; 4 | 5 | export interface MethodDescriptorProto { 6 | 'name'?: (string); 7 | 'inputType'?: (string); 8 | 'outputType'?: (string); 9 | 'options'?: (_google_protobuf_MethodOptions | null); 10 | 'clientStreaming'?: (boolean); 11 | 'serverStreaming'?: (boolean); 12 | } 13 | 14 | export interface MethodDescriptorProto__Output { 15 | 'name': (string); 16 | 'inputType': (string); 17 | 'outputType': (string); 18 | 'options': (_google_protobuf_MethodOptions__Output | null); 19 | 'clientStreaming': (boolean); 20 | 'serverStreaming': (boolean); 21 | } 22 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface _google_protobuf_SourceCodeInfo_Location { 5 | 'path'?: (number)[]; 6 | 'span'?: (number)[]; 7 | 'leadingComments'?: (string); 8 | 'trailingComments'?: (string); 9 | 'leadingDetachedComments'?: (string)[]; 10 | } 11 | 12 | export interface _google_protobuf_SourceCodeInfo_Location__Output { 13 | 'path': (number)[]; 14 | 'span': (number)[]; 15 | 'leadingComments': (string); 16 | 'trailingComments': (string); 17 | 'leadingDetachedComments': (string)[]; 18 | } 19 | 20 | export interface SourceCodeInfo { 21 | 'location'?: (_google_protobuf_SourceCodeInfo_Location)[]; 22 | } 23 | 24 | export interface SourceCodeInfo__Output { 25 | 'location': (_google_protobuf_SourceCodeInfo_Location__Output)[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ExtensionRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | 4 | /** 5 | * The type name and extension number sent by the client when requesting 6 | * file_containing_extension. 7 | */ 8 | export interface ExtensionRequest { 9 | /** 10 | * Fully-qualified type name. The format should be . 11 | */ 12 | 'containingType'?: (string); 13 | 'extensionNumber'?: (number); 14 | } 15 | 16 | /** 17 | * The type name and extension number sent by the client when requesting 18 | * file_containing_extension. 19 | */ 20 | export interface ExtensionRequest__Output { 21 | /** 22 | * Fully-qualified type name. The format should be . 23 | */ 24 | 'containingType': (string); 25 | 'extensionNumber': (number); 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/DoubleRange.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/range.proto 2 | 3 | 4 | /** 5 | * Specifies the double start and end of the range using half-open interval semantics [start, 6 | * end). 7 | */ 8 | export interface DoubleRange { 9 | /** 10 | * start of the range (inclusive) 11 | */ 12 | 'start'?: (number | string); 13 | /** 14 | * end of the range (exclusive) 15 | */ 16 | 'end'?: (number | string); 17 | } 18 | 19 | /** 20 | * Specifies the double start and end of the range using half-open interval semantics [start, 21 | * end). 22 | */ 23 | export interface DoubleRange__Output { 24 | /** 25 | * start of the range (inclusive) 26 | */ 27 | 'start': (number); 28 | /** 29 | * end of the range (exclusive) 30 | */ 31 | 'end': (number); 32 | } 33 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/SourceCodeInfo.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | 4 | export interface _google_protobuf_SourceCodeInfo_Location { 5 | 'path'?: (number)[]; 6 | 'span'?: (number)[]; 7 | 'leadingComments'?: (string); 8 | 'trailingComments'?: (string); 9 | 'leadingDetachedComments'?: (string)[]; 10 | } 11 | 12 | export interface _google_protobuf_SourceCodeInfo_Location__Output { 13 | 'path': (number)[]; 14 | 'span': (number)[]; 15 | 'leadingComments': (string); 16 | 'trailingComments': (string); 17 | 'leadingDetachedComments': (string)[]; 18 | } 19 | 20 | export interface SourceCodeInfo { 21 | 'location'?: (_google_protobuf_SourceCodeInfo_Location)[]; 22 | } 23 | 24 | export interface SourceCodeInfo__Output { 25 | 'location': (_google_protobuf_SourceCodeInfo_Location__Output)[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1alpha/ExtensionRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1alpha/reflection.proto 2 | 3 | 4 | /** 5 | * The type name and extension number sent by the client when requesting 6 | * file_containing_extension. 7 | */ 8 | export interface ExtensionRequest { 9 | /** 10 | * Fully-qualified type name. The format should be . 11 | */ 12 | 'containingType'?: (string); 13 | 'extensionNumber'?: (number); 14 | } 15 | 16 | /** 17 | * The type name and extension number sent by the client when requesting 18 | * file_containing_extension. 19 | */ 20 | export interface ExtensionRequest__Output { 21 | /** 22 | * Fully-qualified type name. The format should be . 23 | */ 24 | 'containingType': (string); 25 | 'extensionNumber': (number); 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-reflection/test/test-utils.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | 3 | import { scope } from '../src/implementations/common/utils'; 4 | 5 | describe('scope', () => { 6 | it('traverses upwards in the package scope', () => { 7 | assert.strictEqual(scope('grpc.health.v1.HealthCheckResponse.ServiceStatus'), 'grpc.health.v1.HealthCheckResponse'); 8 | assert.strictEqual(scope(scope(scope(scope('grpc.health.v1.HealthCheckResponse.ServiceStatus')))), 'grpc'); 9 | }); 10 | 11 | it('returns an empty package when at the top', () => { 12 | assert.strictEqual(scope('Message'), ''); 13 | assert.strictEqual(scope(''), ''); 14 | }); 15 | 16 | it('handles globally scoped references', () => { 17 | assert.strictEqual(scope('.Message'), '.'); 18 | assert.strictEqual(scope(scope('.Message')), ''); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | /** 6 | * SocketRef is a reference to a Socket. 7 | */ 8 | export interface SocketRef { 9 | /** 10 | * The globally unique id for this socket. Must be a positive number. 11 | */ 12 | 'socket_id'?: (number | string | Long); 13 | /** 14 | * An optional name associated with the socket. 15 | */ 16 | 'name'?: (string); 17 | } 18 | 19 | /** 20 | * SocketRef is a reference to a Socket. 21 | */ 22 | export interface SocketRef__Output { 23 | /** 24 | * The globally unique id for this socket. Must be a positive number. 25 | */ 26 | 'socket_id': (string); 27 | /** 28 | * An optional name associated with the socket. 29 | */ 30 | 'name': (string); 31 | } 32 | -------------------------------------------------------------------------------- /test/distrib/distrib-test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 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 | const grpcJs = require('@grpc/grpc-js'); 19 | 20 | const grpcJsXds = require('@grpc/grpc-js-xds'); 21 | 22 | const protoLoader = require('@grpc/proto-loader'); 23 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/StatusCodeFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | import type { ComparisonFilter as _envoy_config_accesslog_v3_ComparisonFilter, ComparisonFilter__Output as _envoy_config_accesslog_v3_ComparisonFilter__Output } from '../../../../envoy/config/accesslog/v3/ComparisonFilter'; 4 | 5 | /** 6 | * Filters on HTTP response/status code. 7 | */ 8 | export interface StatusCodeFilter { 9 | /** 10 | * Comparison. 11 | */ 12 | 'comparison'?: (_envoy_config_accesslog_v3_ComparisonFilter | null); 13 | } 14 | 15 | /** 16 | * Filters on HTTP response/status code. 17 | */ 18 | export interface StatusCodeFilter__Output { 19 | /** 20 | * Comparison. 21 | */ 22 | 'comparison': (_envoy_config_accesslog_v3_ComparisonFilter__Output | null); 23 | } 24 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | /** 6 | * ChannelRef is a reference to a Channel. 7 | */ 8 | export interface ChannelRef { 9 | /** 10 | * The globally unique id for this channel. Must be a positive number. 11 | */ 12 | 'channel_id'?: (number | string | Long); 13 | /** 14 | * An optional name associated with the channel. 15 | */ 16 | 'name'?: (string); 17 | } 18 | 19 | /** 20 | * ChannelRef is a reference to a Channel. 21 | */ 22 | export interface ChannelRef__Output { 23 | /** 24 | * The globally unique id for this channel. Must be a positive number. 25 | */ 26 | 'channel_id': (string); 27 | /** 28 | * An optional name associated with the channel. 29 | */ 30 | 'name': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | /** 6 | * ServerRef is a reference to a Server. 7 | */ 8 | export interface ServerRef { 9 | /** 10 | * A globally unique identifier for this server. Must be a positive number. 11 | */ 12 | 'server_id'?: (number | string | Long); 13 | /** 14 | * An optional name associated with the server. 15 | */ 16 | 'name'?: (string); 17 | } 18 | 19 | /** 20 | * ServerRef is a reference to a Server. 21 | */ 22 | export interface ServerRef__Output { 23 | /** 24 | * A globally unique identifier for this server. Must be a positive number. 25 | */ 26 | 'server_id': (string); 27 | /** 28 | * An optional name associated with the server. 29 | */ 30 | 'name': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2015 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 | # Makes sure NVM is loaded before executing the command passed as an argument 18 | # shellcheck disable=SC1090 19 | source ~/.nvm/nvm.sh 20 | "$@" 21 | -------------------------------------------------------------------------------- /packages/proto-loader/test_protos/enums.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gRPC authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | enum Enum1 { 18 | DEFAULT = 0; 19 | VALUE1 = 1; 20 | VALUE2 = 2; 21 | } 22 | 23 | enum Enum2 { 24 | DEFAULT = 0; 25 | ABC = 5; 26 | DEF = 10; 27 | } -------------------------------------------------------------------------------- /packages/grpc-js/src/auth-context.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 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 { PeerCertificate } from "tls"; 19 | 20 | export interface AuthContext { 21 | transportSecurityType?: string; 22 | sslPeerCertificate?: PeerCertificate; 23 | } 24 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/SemanticVersion.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/semantic_version.proto 2 | 3 | 4 | /** 5 | * Envoy uses SemVer (https://semver.org/). Major/minor versions indicate 6 | * expected behaviors and APIs, the patch version field is used only 7 | * for security fixes and can be generally ignored. 8 | */ 9 | export interface SemanticVersion { 10 | 'major_number'?: (number); 11 | 'minor_number'?: (number); 12 | 'patch'?: (number); 13 | } 14 | 15 | /** 16 | * Envoy uses SemVer (https://semver.org/). Major/minor versions indicate 17 | * expected behaviors and APIs, the patch version field is used only 18 | * for security fixes and can be generally ignored. 19 | */ 20 | export interface SemanticVersion__Output { 21 | 'major_number': (number); 22 | 'minor_number': (number); 23 | 'patch': (number); 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/Empty.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/empty.proto 2 | 3 | 4 | /** 5 | * An empty message that you can re-use to avoid defining duplicated empty 6 | * messages in your project. A typical example is to use it as argument or the 7 | * return value of a service API. For instance: 8 | * 9 | * service Foo { 10 | * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; 11 | * }; 12 | */ 13 | export interface Empty { 14 | } 15 | 16 | /** 17 | * An empty message that you can re-use to avoid defining duplicated empty 18 | * messages in your project. A typical example is to use it as argument or the 19 | * return value of a service API. For instance: 20 | * 21 | * service Foo { 22 | * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; 23 | * }; 24 | */ 25 | export interface Empty__Output { 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ConnectionProperties.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | /** 6 | * Defines fields for a connection 7 | */ 8 | export interface ConnectionProperties { 9 | /** 10 | * Number of bytes received from downstream. 11 | */ 12 | 'received_bytes'?: (number | string | Long); 13 | /** 14 | * Number of bytes sent to downstream. 15 | */ 16 | 'sent_bytes'?: (number | string | Long); 17 | } 18 | 19 | /** 20 | * Defines fields for a connection 21 | */ 22 | export interface ConnectionProperties__Output { 23 | /** 24 | * Number of bytes received from downstream. 25 | */ 26 | 'received_bytes': (string); 27 | /** 28 | * Number of bytes sent to downstream. 29 | */ 30 | 'sent_bytes': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/ServiceDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IMethodDescriptorProto as I_google_protobuf_MethodDescriptorProto, OMethodDescriptorProto as O_google_protobuf_MethodDescriptorProto } from '../../google/protobuf/MethodDescriptorProto'; 4 | import type { IServiceOptions as I_google_protobuf_ServiceOptions, OServiceOptions as O_google_protobuf_ServiceOptions } from '../../google/protobuf/ServiceOptions'; 5 | 6 | export interface IServiceDescriptorProto { 7 | 'name'?: (string); 8 | 'method'?: (I_google_protobuf_MethodDescriptorProto)[]; 9 | 'options'?: (I_google_protobuf_ServiceOptions | null); 10 | } 11 | 12 | export interface OServiceDescriptorProto { 13 | 'name': (string); 14 | 'method': (O_google_protobuf_MethodDescriptorProto)[]; 15 | 'options': (O_google_protobuf_ServiceOptions | null); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/ServiceOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; 4 | import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface ServiceOptions { 7 | 'deprecated'?: (boolean); 8 | 'features'?: (_google_protobuf_FeatureSet | null); 9 | 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; 10 | } 11 | 12 | export interface ServiceOptions__Output { 13 | 'deprecated': (boolean); 14 | 'features': (_google_protobuf_FeatureSet__Output | null); 15 | 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/proto/grpc/testing/simple_messages.proto: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2018 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 | syntax = "proto3"; 17 | 18 | package grpc.testing; 19 | 20 | message SimpleRequest {} 21 | 22 | message SimpleResponse {} 23 | 24 | message StringValue { 25 | string message = 1; 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/ServiceOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; 4 | import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface ServiceOptions { 7 | 'deprecated'?: (boolean); 8 | 'features'?: (_google_protobuf_FeatureSet | null); 9 | 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; 10 | } 11 | 12 | export interface ServiceOptions__Output { 13 | 'deprecated': (boolean); 14 | 'features': (_google_protobuf_FeatureSet__Output | null); 15 | 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeUInt32.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | /** 5 | * Runtime derived uint32 with a default when not specified. 6 | */ 7 | export interface RuntimeUInt32 { 8 | /** 9 | * Default value if runtime value is not available. 10 | */ 11 | 'default_value'?: (number); 12 | /** 13 | * Runtime key to get value for comparison. This value is used if defined. 14 | */ 15 | 'runtime_key'?: (string); 16 | } 17 | 18 | /** 19 | * Runtime derived uint32 with a default when not specified. 20 | */ 21 | export interface RuntimeUInt32__Output { 22 | /** 23 | * Default value if runtime value is not available. 24 | */ 25 | 'default_value': (number); 26 | /** 27 | * Runtime key to get value for comparison. This value is used if defined. 28 | */ 29 | 'runtime_key': (string); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/Int64Range.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/range.proto 2 | 3 | import type { Long } from '@grpc/proto-loader'; 4 | 5 | /** 6 | * Specifies the int64 start and end of the range using half-open interval semantics [start, 7 | * end). 8 | */ 9 | export interface Int64Range { 10 | /** 11 | * start of the range (inclusive) 12 | */ 13 | 'start'?: (number | string | Long); 14 | /** 15 | * end of the range (exclusive) 16 | */ 17 | 'end'?: (number | string | Long); 18 | } 19 | 20 | /** 21 | * Specifies the int64 start and end of the range using half-open interval semantics [start, 22 | * end). 23 | */ 24 | export interface Int64Range__Output { 25 | /** 26 | * start of the range (inclusive) 27 | */ 28 | 'start': (string); 29 | /** 30 | * end of the range (exclusive) 31 | */ 32 | 'end': (string); 33 | } 34 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/OneofOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; 4 | import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface OneofOptions { 7 | 'features'?: (_google_protobuf_FeatureSet | null); 8 | 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; 9 | '.validate.required'?: (boolean); 10 | } 11 | 12 | export interface OneofOptions__Output { 13 | 'features': (_google_protobuf_FeatureSet__Output | null); 14 | 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; 15 | '.validate.required': (boolean); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | /** 6 | * SubchannelRef is a reference to a Subchannel. 7 | */ 8 | export interface SubchannelRef { 9 | /** 10 | * The globally unique id for this subchannel. Must be a positive number. 11 | */ 12 | 'subchannel_id'?: (number | string | Long); 13 | /** 14 | * An optional name associated with the subchannel. 15 | */ 16 | 'name'?: (string); 17 | } 18 | 19 | /** 20 | * SubchannelRef is a reference to a Subchannel. 21 | */ 22 | export interface SubchannelRef__Output { 23 | /** 24 | * The globally unique id for this subchannel. Must be a positive number. 25 | */ 26 | 'subchannel_id': (string); 27 | /** 28 | * An optional name associated with the subchannel. 29 | */ 30 | 'name': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/OneofOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { FeatureSet as _google_protobuf_FeatureSet, FeatureSet__Output as _google_protobuf_FeatureSet__Output } from '../../google/protobuf/FeatureSet'; 4 | import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface OneofOptions { 7 | 'features'?: (_google_protobuf_FeatureSet | null); 8 | 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; 9 | '.validate.required'?: (boolean); 10 | } 11 | 12 | export interface OneofOptions__Output { 13 | 'features': (_google_protobuf_FeatureSet__Output | null); 14 | 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; 15 | '.validate.required': (boolean); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-tools/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 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 | 19 | 'use strict'; 20 | 21 | /** 22 | * package.json requires this file to be present. In the future, this can 23 | * export useful information about the included tools. 24 | */ 25 | 26 | module.exports = {}; 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeDouble.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | /** 5 | * Runtime derived double with a default when not specified. 6 | */ 7 | export interface RuntimeDouble { 8 | /** 9 | * Default value if runtime value is not available. 10 | */ 11 | 'default_value'?: (number | string); 12 | /** 13 | * Runtime key to get value for comparison. This value is used if defined. 14 | */ 15 | 'runtime_key'?: (string); 16 | } 17 | 18 | /** 19 | * Runtime derived double with a default when not specified. 20 | */ 21 | export interface RuntimeDouble__Output { 22 | /** 23 | * Default value if runtime value is not available. 24 | */ 25 | 'default_value': (number); 26 | /** 27 | * Runtime key to get value for comparison. This value is used if defined. 28 | */ 29 | 'runtime_key': (string); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto'; 4 | import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions'; 5 | 6 | export interface ServiceDescriptorProto { 7 | 'name'?: (string); 8 | 'method'?: (_google_protobuf_MethodDescriptorProto)[]; 9 | 'options'?: (_google_protobuf_ServiceOptions | null); 10 | } 11 | 12 | export interface ServiceDescriptorProto__Output { 13 | 'name': (string); 14 | 'method': (_google_protobuf_MethodDescriptorProto__Output)[]; 15 | 'options': (_google_protobuf_ServiceOptions__Output | null); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ExtensionNumberResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | 4 | /** 5 | * A list of extension numbers sent by the server answering 6 | * all_extension_numbers_of_type request. 7 | */ 8 | export interface ExtensionNumberResponse { 9 | /** 10 | * Full name of the base type, including the package name. The format 11 | * is . 12 | */ 13 | 'baseTypeName'?: (string); 14 | 'extensionNumber'?: (number)[]; 15 | } 16 | 17 | /** 18 | * A list of extension numbers sent by the server answering 19 | * all_extension_numbers_of_type request. 20 | */ 21 | export interface ExtensionNumberResponse__Output { 22 | /** 23 | * Full name of the base type, including the package name. The format 24 | * is . 25 | */ 26 | 'baseTypeName': (string); 27 | 'extensionNumber': (number)[]; 28 | } 29 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/interop/generated/grpc/testing/Payload.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/testing/messages.proto 2 | 3 | import type { PayloadType as _grpc_testing_PayloadType, PayloadType__Output as _grpc_testing_PayloadType__Output } from '../../grpc/testing/PayloadType'; 4 | 5 | /** 6 | * A block of data, to simply increase gRPC message size. 7 | */ 8 | export interface Payload { 9 | /** 10 | * The type of data in body. 11 | */ 12 | 'type'?: (_grpc_testing_PayloadType); 13 | /** 14 | * Primary contents of payload. 15 | */ 16 | 'body'?: (Buffer | Uint8Array | string); 17 | } 18 | 19 | /** 20 | * A block of data, to simply increase gRPC message size. 21 | */ 22 | export interface Payload__Output { 23 | /** 24 | * The type of data in body. 25 | */ 26 | 'type': (_grpc_testing_PayloadType__Output); 27 | /** 28 | * Primary contents of payload. 29 | */ 30 | 'body': (Buffer); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/google/protobuf/ServiceDescriptorProto.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { MethodDescriptorProto as _google_protobuf_MethodDescriptorProto, MethodDescriptorProto__Output as _google_protobuf_MethodDescriptorProto__Output } from '../../google/protobuf/MethodDescriptorProto'; 4 | import type { ServiceOptions as _google_protobuf_ServiceOptions, ServiceOptions__Output as _google_protobuf_ServiceOptions__Output } from '../../google/protobuf/ServiceOptions'; 5 | 6 | export interface ServiceDescriptorProto { 7 | 'name'?: (string); 8 | 'method'?: (_google_protobuf_MethodDescriptorProto)[]; 9 | 'options'?: (_google_protobuf_ServiceOptions | null); 10 | } 11 | 12 | export interface ServiceDescriptorProto__Output { 13 | 'name': (string); 14 | 'method': (_google_protobuf_MethodDescriptorProto__Output)[]; 15 | 'options': (_google_protobuf_ServiceOptions__Output | null); 16 | } 17 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1alpha/ExtensionNumberResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1alpha/reflection.proto 2 | 3 | 4 | /** 5 | * A list of extension numbers sent by the server answering 6 | * all_extension_numbers_of_type request. 7 | */ 8 | export interface ExtensionNumberResponse { 9 | /** 10 | * Full name of the base type, including the package name. The format 11 | * is . 12 | */ 13 | 'baseTypeName'?: (string); 14 | 'extensionNumber'?: (number)[]; 15 | } 16 | 17 | /** 18 | * A list of extension numbers sent by the server answering 19 | * all_extension_numbers_of_type request. 20 | */ 21 | export interface ExtensionNumberResponse__Output { 22 | /** 23 | * Full name of the base type, including the package name. The format 24 | * is . 25 | */ 26 | 'baseTypeName': (string); 27 | 'extensionNumber': (number)[]; 28 | } 29 | -------------------------------------------------------------------------------- /test/kokoro/linux.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2017 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # Config file for Kokoro (in protobuf text format) 15 | 16 | # Location of the continuous shell script in repository. 17 | build_file: "grpc-node/test/kokoro.sh" 18 | timeout_mins: 60 19 | action { 20 | define_artifacts { 21 | regex: "github/grpc-node/reports/**/sponge_log.xml" 22 | } 23 | } -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/ControlPlane.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | 4 | /** 5 | * Identifies a specific ControlPlane instance that Envoy is connected to. 6 | */ 7 | export interface ControlPlane { 8 | /** 9 | * An opaque control plane identifier that uniquely identifies an instance 10 | * of control plane. This can be used to identify which control plane instance, 11 | * the Envoy is connected to. 12 | */ 13 | 'identifier'?: (string); 14 | } 15 | 16 | /** 17 | * Identifies a specific ControlPlane instance that Envoy is connected to. 18 | */ 19 | export interface ControlPlane__Output { 20 | /** 21 | * An opaque control plane identifier that uniquely identifies an instance 22 | * of control plane. This can be used to identify which control plane instance, 23 | * the Envoy is connected to. 24 | */ 25 | 'identifier': (string); 26 | } 27 | -------------------------------------------------------------------------------- /packages/proto-loader/test_protos/well_known.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gRPC authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | import "google/protobuf/descriptor.proto"; 18 | 19 | extend google.protobuf.FieldOptions { 20 | bool redact = 52000; 21 | } 22 | 23 | message DescriptorHolder { 24 | google.protobuf.DescriptorProto descriptor = 1; 25 | } 26 | -------------------------------------------------------------------------------- /test/kokoro/macos.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2017 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/test/kokoro.sh" 19 | timeout_mins: 60 20 | action { 21 | define_artifacts { 22 | regex: "github/grpc-node/reports/**/sponge_log.xml" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/kokoro/windows.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2017 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/test/kokoro.bat" 19 | timeout_mins: 60 20 | action { 21 | define_artifacts { 22 | regex: "github/grpc-node/reports/**/sponge_log.xml" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Long } from '@postman/proto-loader'; 4 | 5 | export interface GetSocketRequest { 6 | /** 7 | * socket_id is the identifier of the specific socket to get. 8 | */ 9 | 'socket_id'?: (number | string | Long); 10 | /** 11 | * If true, the response will contain only high level information 12 | * that is inexpensive to obtain. Fields thay may be omitted are 13 | * documented. 14 | */ 15 | 'summary'?: (boolean); 16 | } 17 | 18 | export interface GetSocketRequest__Output { 19 | /** 20 | * socket_id is the identifier of the specific socket to get. 21 | */ 22 | 'socket_id': (string); 23 | /** 24 | * If true, the response will contain only high level information 25 | * that is inexpensive to obtain. Fields thay may be omitted are 26 | * documented. 27 | */ 28 | 'summary': (boolean); 29 | } 30 | -------------------------------------------------------------------------------- /packages/grpc-js/test/generated/test_service.ts: -------------------------------------------------------------------------------- 1 | import type * as grpc from '../../src/index'; 2 | import type { MessageTypeDefinition } from '@postman/proto-loader'; 3 | 4 | import type { Request as _Request, Request__Output as _Request__Output } from './Request'; 5 | import type { Response as _Response, Response__Output as _Response__Output } from './Response'; 6 | import type { TestServiceClient as _TestServiceClient, TestServiceDefinition as _TestServiceDefinition } from './TestService'; 7 | 8 | type SubtypeConstructor any, Subtype> = { 9 | new(...args: ConstructorParameters): Subtype; 10 | }; 11 | 12 | export interface ProtoGrpcType { 13 | Request: MessageTypeDefinition<_Request, _Request__Output> 14 | Response: MessageTypeDefinition<_Response, _Response__Output> 15 | TestService: SubtypeConstructor & { service: _TestServiceDefinition } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/kokoro/xds-v3-interop.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2021 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/packages/grpc-js-xds/scripts/xds-v3.sh" 19 | timeout_mins: 360 20 | action { 21 | define_artifacts { 22 | regex: "github/grpc/reports/**" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/FieldMigrateAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/migrate.proto 2 | 3 | 4 | export interface FieldMigrateAnnotation { 5 | /** 6 | * Rename the field in next version. 7 | */ 8 | 'rename'?: (string); 9 | /** 10 | * Add the field to a named oneof in next version. If this already exists, the 11 | * field will join its siblings under the oneof, otherwise a new oneof will be 12 | * created with the given name. 13 | */ 14 | 'oneof_promotion'?: (string); 15 | } 16 | 17 | export interface FieldMigrateAnnotation__Output { 18 | /** 19 | * Rename the field in next version. 20 | */ 21 | 'rename': (string); 22 | /** 23 | * Add the field to a named oneof in next version. If this already exists, the 24 | * field will join its siblings under the oneof, otherwise a new oneof will be 25 | * created with the given name. 26 | */ 27 | 'oneof_promotion': (string); 28 | } 29 | -------------------------------------------------------------------------------- /test/kokoro/linux_aarch64.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2017 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/test/kokoro_linux_aarch64.sh" 19 | timeout_mins: 60 20 | action { 21 | define_artifacts { 22 | regex: "github/grpc-node/reports/**/sponge_log.xml" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/filters/http/rbac/v3/RBACPerRoute.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/filters/http/rbac/v3/rbac.proto 2 | 3 | import type { RBAC as _envoy_extensions_filters_http_rbac_v3_RBAC, RBAC__Output as _envoy_extensions_filters_http_rbac_v3_RBAC__Output } from '../../../../../../envoy/extensions/filters/http/rbac/v3/RBAC'; 4 | 5 | export interface RBACPerRoute { 6 | /** 7 | * Override the global configuration of the filter with this new config. 8 | * If absent, the global RBAC policy will be disabled for this route. 9 | */ 10 | 'rbac'?: (_envoy_extensions_filters_http_rbac_v3_RBAC | null); 11 | } 12 | 13 | export interface RBACPerRoute__Output { 14 | /** 15 | * Override the global configuration of the filter with this new config. 16 | * If absent, the global RBAC policy will be disabled for this route. 17 | */ 18 | 'rbac': (_envoy_extensions_filters_http_rbac_v3_RBAC__Output | null); 19 | } 20 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ServerReflection.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | import type { MethodDefinition } from '@grpc/proto-loader' 4 | import type { ServerReflectionRequest as _grpc_reflection_v1_ServerReflectionRequest, ServerReflectionRequest__Output as _grpc_reflection_v1_ServerReflectionRequest__Output } from '../../../grpc/reflection/v1/ServerReflectionRequest'; 5 | import type { ServerReflectionResponse as _grpc_reflection_v1_ServerReflectionResponse, ServerReflectionResponse__Output as _grpc_reflection_v1_ServerReflectionResponse__Output } from '../../../grpc/reflection/v1/ServerReflectionResponse'; 6 | 7 | export interface ServerReflectionDefinition { 8 | ServerReflectionInfo: MethodDefinition<_grpc_reflection_v1_ServerReflectionRequest, _grpc_reflection_v1_ServerReflectionResponse, _grpc_reflection_v1_ServerReflectionRequest__Output, _grpc_reflection_v1_ServerReflectionResponse__Output> 9 | } 10 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/PagedExpandRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | 4 | /** 5 | * The request for the PagedExpand method. 6 | */ 7 | export interface IPagedExpandRequest { 8 | /** 9 | * The string to expand. 10 | */ 11 | 'content'?: (string); 12 | /** 13 | * The amount of words to returned in each page. 14 | */ 15 | 'page_size'?: (number); 16 | /** 17 | * The position of the page to be returned. 18 | */ 19 | 'page_token'?: (string); 20 | } 21 | 22 | /** 23 | * The request for the PagedExpand method. 24 | */ 25 | export interface OPagedExpandRequest { 26 | /** 27 | * The string to expand. 28 | */ 29 | 'content': (string); 30 | /** 31 | * The amount of words to returned in each page. 32 | */ 33 | 'page_size': (number); 34 | /** 35 | * The position of the page to be returned. 36 | */ 37 | 'page_token': (string); 38 | } 39 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/protobuf-any.ts: -------------------------------------------------------------------------------- 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 | // This is a non-public, unstable API, but it's very convenient 18 | import { loadProtosWithOptionsSync } from '@grpc/proto-loader/build/src/util'; 19 | import { Any__Output } from './generated/google/protobuf/Any'; 20 | 21 | function parseAnyMessage(encodedMessage: Any__Output) { 22 | 23 | } -------------------------------------------------------------------------------- /tools/release/native/Dockerfile: -------------------------------------------------------------------------------- 1 | # NOTE: We don't have to worry about glibc versions 2 | # because we use static linking during the 3 | # compile step. 4 | # (See packages/grpc-tools/CMakeLists.txt#L25) 5 | 6 | FROM ubuntu:22.04 7 | 8 | RUN apt-get update 9 | RUN apt-get install -y cmake curl build-essential \ 10 | python3 libc6-dev-i386-cross libc6-dev-amd64-cross \ 11 | libc6-dev-arm64-cross lib32stdc++6-amd64-cross jq \ 12 | lib32stdc++6-x32-cross libstdc++6-amd64-cross \ 13 | libstdc++6-arm64-cross libstdc++6-i386-cross \ 14 | gcc-i686-linux-gnu g++-i686-linux-gnu tar file \ 15 | gcc-x86-64-linux-gnu g++-x86-64-linux-gnu binutils \ 16 | gcc-aarch64-linux-gnu g++-aarch64-linux-gnu make \ 17 | gcc g++ gzip bash libc6-amd64-i386-cross \ 18 | libc6-dev-amd64-i386-cross 19 | 20 | RUN mkdir /usr/local/nvm 21 | ENV NVM_DIR /usr/local/nvm 22 | 23 | RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 24 | -------------------------------------------------------------------------------- /packages/proto-loader/test_protos/messages.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 gRPC authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | message LongValues { 18 | int64 int_64 = 1; 19 | uint64 uint_64 = 2; 20 | sint64 sint_64 = 3; 21 | fixed64 fixed_64 = 4; 22 | sfixed64 sfixed_64 = 5; 23 | } 24 | 25 | message SequenceValues { 26 | bytes bytes_field = 1; 27 | repeated int32 repeated_field = 2; 28 | } -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/RequestMethod.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | /** 4 | * HTTP request method. 5 | */ 6 | export const RequestMethod = { 7 | METHOD_UNSPECIFIED: 'METHOD_UNSPECIFIED', 8 | GET: 'GET', 9 | HEAD: 'HEAD', 10 | POST: 'POST', 11 | PUT: 'PUT', 12 | DELETE: 'DELETE', 13 | CONNECT: 'CONNECT', 14 | OPTIONS: 'OPTIONS', 15 | TRACE: 'TRACE', 16 | PATCH: 'PATCH', 17 | } as const; 18 | 19 | /** 20 | * HTTP request method. 21 | */ 22 | export type RequestMethod = 23 | | 'METHOD_UNSPECIFIED' 24 | | 0 25 | | 'GET' 26 | | 1 27 | | 'HEAD' 28 | | 2 29 | | 'POST' 30 | | 3 31 | | 'PUT' 32 | | 4 33 | | 'DELETE' 34 | | 5 35 | | 'CONNECT' 36 | | 6 37 | | 'OPTIONS' 38 | | 7 39 | | 'TRACE' 40 | | 8 41 | | 'PATCH' 42 | | 9 43 | 44 | /** 45 | * HTTP request method. 46 | */ 47 | export type RequestMethod__Output = typeof RequestMethod[keyof typeof RequestMethod] 48 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/ListMatcher.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/matcher/v3/value.proto 2 | 3 | import type { ValueMatcher as _envoy_type_matcher_v3_ValueMatcher, ValueMatcher__Output as _envoy_type_matcher_v3_ValueMatcher__Output } from '../../../../envoy/type/matcher/v3/ValueMatcher'; 4 | 5 | /** 6 | * Specifies the way to match a list value. 7 | */ 8 | export interface ListMatcher { 9 | /** 10 | * If specified, at least one of the values in the list must match the value specified. 11 | */ 12 | 'one_of'?: (_envoy_type_matcher_v3_ValueMatcher | null); 13 | 'match_pattern'?: "one_of"; 14 | } 15 | 16 | /** 17 | * Specifies the way to match a list value. 18 | */ 19 | export interface ListMatcher__Output { 20 | /** 21 | * If specified, at least one of the values in the list must match the value specified. 22 | */ 23 | 'one_of'?: (_envoy_type_matcher_v3_ValueMatcher__Output | null); 24 | 'match_pattern'?: "one_of"; 25 | } 26 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/EchoResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | import type { ISeverity as I_google_showcase_v1beta1_Severity, OSeverity as O_google_showcase_v1beta1_Severity } from '../../../google/showcase/v1beta1/Severity'; 4 | 5 | /** 6 | * The response message for the Echo methods. 7 | */ 8 | export interface IEchoResponse { 9 | /** 10 | * The content specified in the request. 11 | */ 12 | 'content'?: (string); 13 | /** 14 | * The severity specified in the request. 15 | */ 16 | 'severity'?: (I_google_showcase_v1beta1_Severity); 17 | } 18 | 19 | /** 20 | * The response message for the Echo methods. 21 | */ 22 | export interface OEchoResponse { 23 | /** 24 | * The content specified in the request. 25 | */ 26 | 'content': (string); 27 | /** 28 | * The severity specified in the request. 29 | */ 30 | 'severity': (O_google_showcase_v1beta1_Severity); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js/test/fixtures/server1.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAOHDFScoLCVJpYDD 3 | M4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1BgzkWF+slf 4 | 3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd9N8YwbBY 5 | AckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAECgYAn7qGnM2vbjJNBm0VZCkOkTIWm 6 | V10okw7EPJrdL2mkre9NasghNXbE1y5zDshx5Nt3KsazKOxTT8d0Jwh/3KbaN+YY 7 | tTCbKGW0pXDRBhwUHRcuRzScjli8Rih5UOCiZkhefUTcRb6xIhZJuQy71tjaSy0p 8 | dHZRmYyBYO2YEQ8xoQJBAPrJPhMBkzmEYFtyIEqAxQ/o/A6E+E4w8i+KM7nQCK7q 9 | K4JXzyXVAjLfyBZWHGM2uro/fjqPggGD6QH1qXCkI4MCQQDmdKeb2TrKRh5BY1LR 10 | 81aJGKcJ2XbcDu6wMZK4oqWbTX2KiYn9GB0woM6nSr/Y6iy1u145YzYxEV/iMwff 11 | DJULAkB8B2MnyzOg0pNFJqBJuH29bKCcHa8gHJzqXhNO5lAlEbMK95p/P2Wi+4Hd 12 | aiEIAF1BF326QJcvYKmwSmrORp85AkAlSNxRJ50OWrfMZnBgzVjDx3xG6KsFQVk2 13 | ol6VhqL6dFgKUORFUWBvnKSyhjJxurlPEahV6oo6+A+mPhFY8eUvAkAZQyTdupP3 14 | XEFQKctGz+9+gKkemDp7LBBMEMBXrGTLPhpEfcjv/7KPdnFHYmhYeBTBnuVmTVWe 15 | F98XJ7tIFfJq 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/fixtures/server1.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAOHDFScoLCVJpYDD 3 | M4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1BgzkWF+slf 4 | 3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd9N8YwbBY 5 | AckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAECgYAn7qGnM2vbjJNBm0VZCkOkTIWm 6 | V10okw7EPJrdL2mkre9NasghNXbE1y5zDshx5Nt3KsazKOxTT8d0Jwh/3KbaN+YY 7 | tTCbKGW0pXDRBhwUHRcuRzScjli8Rih5UOCiZkhefUTcRb6xIhZJuQy71tjaSy0p 8 | dHZRmYyBYO2YEQ8xoQJBAPrJPhMBkzmEYFtyIEqAxQ/o/A6E+E4w8i+KM7nQCK7q 9 | K4JXzyXVAjLfyBZWHGM2uro/fjqPggGD6QH1qXCkI4MCQQDmdKeb2TrKRh5BY1LR 10 | 81aJGKcJ2XbcDu6wMZK4oqWbTX2KiYn9GB0woM6nSr/Y6iy1u145YzYxEV/iMwff 11 | DJULAkB8B2MnyzOg0pNFJqBJuH29bKCcHa8gHJzqXhNO5lAlEbMK95p/P2Wi+4Hd 12 | aiEIAF1BF326QJcvYKmwSmrORp85AkAlSNxRJ50OWrfMZnBgzVjDx3xG6KsFQVk2 13 | ol6VhqL6dFgKUORFUWBvnKSyhjJxurlPEahV6oo6+A+mPhFY8eUvAkAZQyTdupP3 14 | XEFQKctGz+9+gKkemDp7LBBMEMBXrGTLPhpEfcjv/7KPdnFHYmhYeBTBnuVmTVWe 15 | F98XJ7tIFfJq 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/type/v3/CodecClientType.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/type/v3/http.proto 2 | 3 | export const CodecClientType = { 4 | HTTP1: 'HTTP1', 5 | HTTP2: 'HTTP2', 6 | /** 7 | * [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with 8 | * caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient 9 | * to distinguish HTTP1 and HTTP2 traffic. 10 | */ 11 | HTTP3: 'HTTP3', 12 | } as const; 13 | 14 | export type CodecClientType = 15 | | 'HTTP1' 16 | | 0 17 | | 'HTTP2' 18 | | 1 19 | /** 20 | * [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with 21 | * caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient 22 | * to distinguish HTTP1 and HTTP2 traffic. 23 | */ 24 | | 'HTTP3' 25 | | 2 26 | 27 | export type CodecClientType__Output = typeof CodecClientType[keyof typeof CodecClientType] 28 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/PagedExpandResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | import type { IEchoResponse as I_google_showcase_v1beta1_EchoResponse, OEchoResponse as O_google_showcase_v1beta1_EchoResponse } from '../../../google/showcase/v1beta1/EchoResponse'; 4 | 5 | /** 6 | * The response for the PagedExpand method. 7 | */ 8 | export interface IPagedExpandResponse { 9 | /** 10 | * The words that were expanded. 11 | */ 12 | 'responses'?: (I_google_showcase_v1beta1_EchoResponse)[]; 13 | /** 14 | * The next page token. 15 | */ 16 | 'next_page_token'?: (string); 17 | } 18 | 19 | /** 20 | * The response for the PagedExpand method. 21 | */ 22 | export interface OPagedExpandResponse { 23 | /** 24 | * The words that were expanded. 25 | */ 26 | 'responses': (O_google_showcase_v1beta1_EchoResponse)[]; 27 | /** 28 | * The next page token. 29 | */ 30 | 'next_page_token': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/validate/KnownRegex.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/protoc-gen-validate/validate/validate.proto 2 | 3 | /** 4 | * WellKnownRegex contain some well-known patterns. 5 | */ 6 | export const KnownRegex = { 7 | UNKNOWN: 'UNKNOWN', 8 | /** 9 | * HTTP header name as defined by RFC 7230. 10 | */ 11 | HTTP_HEADER_NAME: 'HTTP_HEADER_NAME', 12 | /** 13 | * HTTP header value as defined by RFC 7230. 14 | */ 15 | HTTP_HEADER_VALUE: 'HTTP_HEADER_VALUE', 16 | } as const; 17 | 18 | /** 19 | * WellKnownRegex contain some well-known patterns. 20 | */ 21 | export type KnownRegex = 22 | | 'UNKNOWN' 23 | | 0 24 | /** 25 | * HTTP header name as defined by RFC 7230. 26 | */ 27 | | 'HTTP_HEADER_NAME' 28 | | 1 29 | /** 30 | * HTTP header value as defined by RFC 7230. 31 | */ 32 | | 'HTTP_HEADER_VALUE' 33 | | 2 34 | 35 | /** 36 | * WellKnownRegex contain some well-known patterns. 37 | */ 38 | export type KnownRegex__Output = typeof KnownRegex[keyof typeof KnownRegex] 39 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/validate/KnownRegex.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/protoc-gen-validate/validate/validate.proto 2 | 3 | /** 4 | * WellKnownRegex contain some well-known patterns. 5 | */ 6 | export const KnownRegex = { 7 | UNKNOWN: 'UNKNOWN', 8 | /** 9 | * HTTP header name as defined by RFC 7230. 10 | */ 11 | HTTP_HEADER_NAME: 'HTTP_HEADER_NAME', 12 | /** 13 | * HTTP header value as defined by RFC 7230. 14 | */ 15 | HTTP_HEADER_VALUE: 'HTTP_HEADER_VALUE', 16 | } as const; 17 | 18 | /** 19 | * WellKnownRegex contain some well-known patterns. 20 | */ 21 | export type KnownRegex = 22 | | 'UNKNOWN' 23 | | 0 24 | /** 25 | * HTTP header name as defined by RFC 7230. 26 | */ 27 | | 'HTTP_HEADER_NAME' 28 | | 1 29 | /** 30 | * HTTP header value as defined by RFC 7230. 31 | */ 32 | | 'HTTP_HEADER_VALUE' 33 | | 2 34 | 35 | /** 36 | * WellKnownRegex contain some well-known patterns. 37 | */ 38 | export type KnownRegex__Output = typeof KnownRegex[keyof typeof KnownRegex] 39 | -------------------------------------------------------------------------------- /packages/grpc-reflection/proto/sample/sample.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package sample; 4 | 5 | import 'vendor.proto'; 6 | import 'unscoped.proto'; 7 | 8 | service SampleService { 9 | rpc Hello (HelloRequest) returns (HelloResponse) {} 10 | rpc Hello2 (HelloRequest) returns (CommonMessage) {} 11 | rpc Hello3 (ProcessRequest) returns (TopLevelMessage) {} 12 | } 13 | 14 | service IgnoreService { 15 | rpc Hello (HelloRequest) returns (HelloResponse) {} 16 | } 17 | 18 | message HelloRequest { 19 | string hello = 1; 20 | HelloNested nested = 2; 21 | ShadowedMessage nestedShadowedMessage = 3; 22 | 23 | message HelloNested { 24 | string hello = 1; 25 | CommonMessage field = 2; 26 | } 27 | 28 | message ShadowedMessage { 29 | int32 item = 1; 30 | } 31 | } 32 | 33 | enum HelloStatus { 34 | HELLO = 1; 35 | WORLD = 2; 36 | } 37 | 38 | message HelloResponse { 39 | string world = 1; 40 | HelloStatus status = 2; 41 | } 42 | 43 | message ShadowedMessage { 44 | string hello = 1; 45 | } 46 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/OrFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | import type { AccessLogFilter as _envoy_config_accesslog_v3_AccessLogFilter, AccessLogFilter__Output as _envoy_config_accesslog_v3_AccessLogFilter__Output } from '../../../../envoy/config/accesslog/v3/AccessLogFilter'; 4 | 5 | /** 6 | * Performs a logical “or” operation on the result of each individual filter. 7 | * Filters are evaluated sequentially and if one of them returns true, the 8 | * filter returns true immediately. 9 | */ 10 | export interface OrFilter { 11 | 'filters'?: (_envoy_config_accesslog_v3_AccessLogFilter)[]; 12 | } 13 | 14 | /** 15 | * Performs a logical “or” operation on the result of each individual filter. 16 | * Filters are evaluated sequentially and if one of them returns true, the 17 | * filter returns true immediately. 18 | */ 19 | export interface OrFilter__Output { 20 | 'filters': (_envoy_config_accesslog_v3_AccessLogFilter__Output)[]; 21 | } 22 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/load_balancing_policies/pick_first/v3/PickFirst.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto 2 | 3 | 4 | /** 5 | * This configuration allows the built-in PICK_FIRST LB policy to be configured 6 | * via the LB policy extension point. 7 | */ 8 | export interface PickFirst { 9 | /** 10 | * If set to true, instructs the LB policy to shuffle the list of addresses 11 | * received from the name resolver before attempting to connect to them. 12 | */ 13 | 'shuffle_address_list'?: (boolean); 14 | } 15 | 16 | /** 17 | * This configuration allows the built-in PICK_FIRST LB policy to be configured 18 | * via the LB policy extension point. 19 | */ 20 | export interface PickFirst__Output { 21 | /** 22 | * If set to true, instructs the LB policy to shuffle the list of addresses 23 | * received from the name resolver before attempting to connect to them. 24 | */ 25 | 'shuffle_address_list': (boolean); 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/test-register.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 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 * as assert from 'assert'; 19 | import { register } from '../src'; 20 | 21 | /* This is just a basic test to confirm that the package builds and the setup 22 | * code runs. */ 23 | describe('register function', () => { 24 | it('Should succeed without errors', () => { 25 | assert.doesNotThrow(register); 26 | }); 27 | }); -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1alpha/ServerReflection.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1alpha/reflection.proto 2 | 3 | import type { MethodDefinition } from '@grpc/proto-loader' 4 | import type { ServerReflectionRequest as _grpc_reflection_v1alpha_ServerReflectionRequest, ServerReflectionRequest__Output as _grpc_reflection_v1alpha_ServerReflectionRequest__Output } from '../../../grpc/reflection/v1alpha/ServerReflectionRequest'; 5 | import type { ServerReflectionResponse as _grpc_reflection_v1alpha_ServerReflectionResponse, ServerReflectionResponse__Output as _grpc_reflection_v1alpha_ServerReflectionResponse__Output } from '../../../grpc/reflection/v1alpha/ServerReflectionResponse'; 6 | 7 | export interface ServerReflectionDefinition { 8 | ServerReflectionInfo: MethodDefinition<_grpc_reflection_v1alpha_ServerReflectionRequest, _grpc_reflection_v1alpha_ServerReflectionResponse, _grpc_reflection_v1alpha_ServerReflectionRequest__Output, _grpc_reflection_v1alpha_ServerReflectionResponse__Output> 9 | } 10 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/ServiceOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IFeatureSet as I_google_protobuf_FeatureSet, OFeatureSet as O_google_protobuf_FeatureSet } from '../../google/protobuf/FeatureSet'; 4 | import type { IUninterpretedOption as I_google_protobuf_UninterpretedOption, OUninterpretedOption as O_google_protobuf_UninterpretedOption } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface IServiceOptions { 7 | 'deprecated'?: (boolean); 8 | 'features'?: (I_google_protobuf_FeatureSet | null); 9 | 'uninterpretedOption'?: (I_google_protobuf_UninterpretedOption)[]; 10 | '.google.api.default_host'?: (string); 11 | '.google.api.oauth_scopes'?: (string); 12 | } 13 | 14 | export interface OServiceOptions { 15 | 'deprecated': (boolean); 16 | 'features': (O_google_protobuf_FeatureSet | null); 17 | 'uninterpretedOption': (O_google_protobuf_UninterpretedOption)[]; 18 | '.google.api.default_host': (string); 19 | '.google.api.oauth_scopes': (string); 20 | } 21 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AndFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | import type { AccessLogFilter as _envoy_config_accesslog_v3_AccessLogFilter, AccessLogFilter__Output as _envoy_config_accesslog_v3_AccessLogFilter__Output } from '../../../../envoy/config/accesslog/v3/AccessLogFilter'; 4 | 5 | /** 6 | * Performs a logical “and” operation on the result of each filter in filters. 7 | * Filters are evaluated sequentially and if one of them returns false, the 8 | * filter returns false immediately. 9 | */ 10 | export interface AndFilter { 11 | 'filters'?: (_envoy_config_accesslog_v3_AccessLogFilter)[]; 12 | } 13 | 14 | /** 15 | * Performs a logical “and” operation on the result of each filter in filters. 16 | * Filters are evaluated sequentially and if one of them returns false, the 17 | * filter returns false immediately. 18 | */ 19 | export interface AndFilter__Output { 20 | 'filters': (_envoy_config_accesslog_v3_AccessLogFilter__Output)[]; 21 | } 22 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/HeaderFilter.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto 2 | 3 | import type { HeaderMatcher as _envoy_config_route_v3_HeaderMatcher, HeaderMatcher__Output as _envoy_config_route_v3_HeaderMatcher__Output } from '../../../../envoy/config/route/v3/HeaderMatcher'; 4 | 5 | /** 6 | * Filters requests based on the presence or value of a request header. 7 | */ 8 | export interface HeaderFilter { 9 | /** 10 | * Only requests with a header which matches the specified HeaderMatcher will 11 | * pass the filter check. 12 | */ 13 | 'header'?: (_envoy_config_route_v3_HeaderMatcher | null); 14 | } 15 | 16 | /** 17 | * Filters requests based on the presence or value of a request header. 18 | */ 19 | export interface HeaderFilter__Output { 20 | /** 21 | * Only requests with a header which matches the specified HeaderMatcher will 22 | * pass the filter check. 23 | */ 24 | 'header': (_envoy_config_route_v3_HeaderMatcher__Output | null); 25 | } 26 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/ScopedRouteConfigurationsList.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto 2 | 3 | import type { ScopedRouteConfiguration as _envoy_config_route_v3_ScopedRouteConfiguration, ScopedRouteConfiguration__Output as _envoy_config_route_v3_ScopedRouteConfiguration__Output } from '../../../../../../envoy/config/route/v3/ScopedRouteConfiguration'; 4 | 5 | /** 6 | * This message is used to work around the limitations with 'oneof' and repeated fields. 7 | */ 8 | export interface ScopedRouteConfigurationsList { 9 | 'scoped_route_configurations'?: (_envoy_config_route_v3_ScopedRouteConfiguration)[]; 10 | } 11 | 12 | /** 13 | * This message is used to work around the limitations with 'oneof' and repeated fields. 14 | */ 15 | export interface ScopedRouteConfigurationsList__Output { 16 | 'scoped_route_configurations': (_envoy_config_route_v3_ScopedRouteConfiguration__Output)[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/showcase/v1beta1/ExpandRequest.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/gapic-showcase/schema/google/showcase/v1beta1/echo.proto 2 | 3 | import type { IStatus as I_google_rpc_Status, OStatus as O_google_rpc_Status } from '../../../google/rpc/Status'; 4 | 5 | /** 6 | * The request message for the Expand method. 7 | */ 8 | export interface IExpandRequest { 9 | /** 10 | * The content that will be split into words and returned on the stream. 11 | */ 12 | 'content'?: (string); 13 | /** 14 | * The error that is thrown after all words are sent on the stream. 15 | */ 16 | 'error'?: (I_google_rpc_Status | null); 17 | } 18 | 19 | /** 20 | * The request message for the Expand method. 21 | */ 22 | export interface OExpandRequest { 23 | /** 24 | * The content that will be split into words and returned on the stream. 25 | */ 26 | 'content': (string); 27 | /** 28 | * The error that is thrown after all words are sent on the stream. 29 | */ 30 | 'error': (O_google_rpc_Status | null); 31 | } 32 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/StatusAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/status.proto 2 | 3 | import type { PackageVersionStatus as _udpa_annotations_PackageVersionStatus, PackageVersionStatus__Output as _udpa_annotations_PackageVersionStatus__Output } from '../../udpa/annotations/PackageVersionStatus'; 4 | 5 | export interface StatusAnnotation { 6 | /** 7 | * The entity is work-in-progress and subject to breaking changes. 8 | */ 9 | 'work_in_progress'?: (boolean); 10 | /** 11 | * The entity belongs to a package with the given version status. 12 | */ 13 | 'package_version_status'?: (_udpa_annotations_PackageVersionStatus); 14 | } 15 | 16 | export interface StatusAnnotation__Output { 17 | /** 18 | * The entity is work-in-progress and subject to breaking changes. 19 | */ 20 | 'work_in_progress': (boolean); 21 | /** 22 | * The entity belongs to a package with the given version status. 23 | */ 24 | 'package_version_status': (_udpa_annotations_PackageVersionStatus__Output); 25 | } 26 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/validate/MessageRules.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/protoc-gen-validate/validate/validate.proto 2 | 3 | 4 | /** 5 | * MessageRules describe the constraints applied to embedded message values. 6 | * For message-type fields, validation is performed recursively. 7 | */ 8 | export interface MessageRules { 9 | /** 10 | * Skip specifies that the validation rules of this field should not be 11 | * evaluated 12 | */ 13 | 'skip'?: (boolean); 14 | /** 15 | * Required specifies that this field must be set 16 | */ 17 | 'required'?: (boolean); 18 | } 19 | 20 | /** 21 | * MessageRules describe the constraints applied to embedded message values. 22 | * For message-type fields, validation is performed recursively. 23 | */ 24 | export interface MessageRules__Output { 25 | /** 26 | * Skip specifies that the validation rules of this field should not be 27 | * evaluated 28 | */ 29 | 'skip': (boolean); 30 | /** 31 | * Required specifies that this field must be set 32 | */ 33 | 'required': (boolean); 34 | } 35 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/Pipe.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/address.proto 2 | 3 | 4 | export interface Pipe { 5 | /** 6 | * Unix Domain Socket path. On Linux, paths starting with '@' will use the 7 | * abstract namespace. The starting '@' is replaced by a null byte by Envoy. 8 | * Paths starting with '@' will result in an error in environments other than 9 | * Linux. 10 | */ 11 | 'path'?: (string); 12 | /** 13 | * The mode for the Pipe. Not applicable for abstract sockets. 14 | */ 15 | 'mode'?: (number); 16 | } 17 | 18 | export interface Pipe__Output { 19 | /** 20 | * Unix Domain Socket path. On Linux, paths starting with '@' will use the 21 | * abstract namespace. The starting '@' is replaced by a null byte by Envoy. 22 | * Paths starting with '@' will result in an error in environments other than 23 | * Linux. 24 | */ 25 | 'path': (string); 26 | /** 27 | * The mode for the Pipe. Not applicable for abstract sockets. 28 | */ 29 | 'mode': (number); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/validate/MessageRules.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/protoc-gen-validate/validate/validate.proto 2 | 3 | 4 | /** 5 | * MessageRules describe the constraints applied to embedded message values. 6 | * For message-type fields, validation is performed recursively. 7 | */ 8 | export interface MessageRules { 9 | /** 10 | * Skip specifies that the validation rules of this field should not be 11 | * evaluated 12 | */ 13 | 'skip'?: (boolean); 14 | /** 15 | * Required specifies that this field must be set 16 | */ 17 | 'required'?: (boolean); 18 | } 19 | 20 | /** 21 | * MessageRules describe the constraints applied to embedded message values. 22 | * For message-type fields, validation is performed recursively. 23 | */ 24 | export interface MessageRules__Output { 25 | /** 26 | * Skip specifies that the validation rules of this field should not be 27 | * evaluated 28 | */ 29 | 'skip': (boolean); 30 | /** 31 | * Required specifies that this field must be set 32 | */ 33 | 'required': (boolean); 34 | } 35 | -------------------------------------------------------------------------------- /packages/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/channelz.proto 2 | 3 | import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../google/protobuf/Duration'; 4 | 5 | /** 6 | * For use with SocketOption's additional field. This is primarily used for 7 | * SO_LINGER. 8 | */ 9 | export interface SocketOptionLinger { 10 | /** 11 | * active maps to `struct linger.l_onoff` 12 | */ 13 | 'active'?: (boolean); 14 | /** 15 | * duration maps to `struct linger.l_linger` 16 | */ 17 | 'duration'?: (_google_protobuf_Duration | null); 18 | } 19 | 20 | /** 21 | * For use with SocketOption's additional field. This is primarily used for 22 | * SO_LINGER. 23 | */ 24 | export interface SocketOptionLinger__Output { 25 | /** 26 | * active maps to `struct linger.l_onoff` 27 | */ 28 | 'active': (boolean); 29 | /** 30 | * duration maps to `struct linger.l_linger` 31 | */ 32 | 'duration': (_google_protobuf_Duration__Output | null); 33 | } 34 | -------------------------------------------------------------------------------- /doc/compression.md: -------------------------------------------------------------------------------- 1 | # Compression 2 | 3 | ## Client side 4 | The preferred method for configuring message compression on a client is to pass `options` when the client object is instantiated. 5 | 6 | These two options control compression behavior: 7 | 8 | **grpc.default_compression_algorithm** (int) 9 | 10 | Default compression algorithm for the channel, applies to sending messages. 11 | 12 | Possible values for this option are: 13 | - `0` - No compression 14 | - `1` - Compress with DEFLATE algorithm 15 | - `2` - Compress with GZIP algorithm 16 | - `3` - Stream compression with GZIP algorithm 17 | 18 | **grpc.default_compression_level** (int) 19 | 20 | Default compression level for the channel, applies to receiving messages. 21 | 22 | Possible values for this option are: 23 | - `0` - None 24 | - `1` - Low level 25 | - `2` - Medium level 26 | - `3` - High level 27 | 28 | ### Code example 29 | ```javascript 30 | client = new ExampleClient("example.com", credentials.createInsecure(), {'grpc.default_compression_algorithm': 2, 'grpc.default_compression_level': 2}); 31 | ``` 32 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/extensions/clusters/aggregate/v3/ClusterConfig.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/extensions/clusters/aggregate/v3/cluster.proto 2 | 3 | 4 | /** 5 | * Configuration for the aggregate cluster. See the :ref:`architecture overview 6 | * ` for more information. 7 | * [#extension: envoy.clusters.aggregate] 8 | */ 9 | export interface ClusterConfig { 10 | /** 11 | * Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they 12 | * appear in this list. 13 | */ 14 | 'clusters'?: (string)[]; 15 | } 16 | 17 | /** 18 | * Configuration for the aggregate cluster. See the :ref:`architecture overview 19 | * ` for more information. 20 | * [#extension: envoy.clusters.aggregate] 21 | */ 22 | export interface ClusterConfig__Output { 23 | /** 24 | * Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they 25 | * appear in this list. 26 | */ 27 | 'clusters': (string)[]; 28 | } 29 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/xds/annotations/v3/StatusAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/xds/annotations/v3/status.proto 2 | 3 | import type { PackageVersionStatus as _xds_annotations_v3_PackageVersionStatus, PackageVersionStatus__Output as _xds_annotations_v3_PackageVersionStatus__Output } from '../../../xds/annotations/v3/PackageVersionStatus'; 4 | 5 | export interface StatusAnnotation { 6 | /** 7 | * The entity is work-in-progress and subject to breaking changes. 8 | */ 9 | 'work_in_progress'?: (boolean); 10 | /** 11 | * The entity belongs to a package with the given version status. 12 | */ 13 | 'package_version_status'?: (_xds_annotations_v3_PackageVersionStatus); 14 | } 15 | 16 | export interface StatusAnnotation__Output { 17 | /** 18 | * The entity is work-in-progress and subject to breaking changes. 19 | */ 20 | 'work_in_progress': (boolean); 21 | /** 22 | * The entity belongs to a package with the given version status. 23 | */ 24 | 'package_version_status': (_xds_annotations_v3_PackageVersionStatus__Output); 25 | } 26 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolverOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/resolver.proto 2 | 3 | 4 | /** 5 | * Configuration of DNS resolver option flags which control the behavior of the DNS resolver. 6 | */ 7 | export interface DnsResolverOptions { 8 | /** 9 | * Use TCP for all DNS queries instead of the default protocol UDP. 10 | */ 11 | 'use_tcp_for_dns_lookups'?: (boolean); 12 | /** 13 | * Do not use the default search domains; only query hostnames as-is or as aliases. 14 | */ 15 | 'no_default_search_domain'?: (boolean); 16 | } 17 | 18 | /** 19 | * Configuration of DNS resolver option flags which control the behavior of the DNS resolver. 20 | */ 21 | export interface DnsResolverOptions__Output { 22 | /** 23 | * Use TCP for all DNS queries instead of the default protocol UDP. 24 | */ 25 | 'use_tcp_for_dns_lookups': (boolean); 26 | /** 27 | * Do not use the default search domains; only query hostnames as-is or as aliases. 28 | */ 29 | 'no_default_search_domain': (boolean); 30 | } 31 | -------------------------------------------------------------------------------- /packages/grpc-reflection/src/generated/grpc/reflection/v1/ListServiceResponse.ts: -------------------------------------------------------------------------------- 1 | // Original file: proto/grpc/reflection/v1/reflection.proto 2 | 3 | import type { ServiceResponse as _grpc_reflection_v1_ServiceResponse, ServiceResponse__Output as _grpc_reflection_v1_ServiceResponse__Output } from '../../../grpc/reflection/v1/ServiceResponse'; 4 | 5 | /** 6 | * A list of ServiceResponse sent by the server answering list_services request. 7 | */ 8 | export interface ListServiceResponse { 9 | /** 10 | * The information of each service may be expanded in the future, so we use 11 | * ServiceResponse message to encapsulate it. 12 | */ 13 | 'service'?: (_grpc_reflection_v1_ServiceResponse)[]; 14 | } 15 | 16 | /** 17 | * A list of ServiceResponse sent by the server answering list_services request. 18 | */ 19 | export interface ListServiceResponse__Output { 20 | /** 21 | * The information of each service may be expanded in the future, so we use 22 | * ServiceResponse message to encapsulate it. 23 | */ 24 | 'service': (_grpc_reflection_v1_ServiceResponse__Output)[]; 25 | } 26 | -------------------------------------------------------------------------------- /test/client-libraries-integration/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2019 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 | npm install 17 | 18 | for dir in $(node -p "require('./repositories.json').join('\n')"); do 19 | pushd libs 20 | if [ ! -d $dir ]; then 21 | git clone https://github.com/googleapis/$dir 22 | pushd $dir 23 | npm install 24 | popd 25 | fi 26 | popd 27 | SMOKE_TEST_PROJECT=$GCLOUD_PROJECT node --require ./use-grpc-js.js $(npm bin)/_mocha --timeout 60000 libs/$dir/system-test/*.js 28 | done 29 | -------------------------------------------------------------------------------- /test/distrib/run-distrib-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2022 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 | set -ex 17 | 18 | cd $(dirname $0) 19 | base=$(pwd) 20 | 21 | cd ../../packages/grpc-js 22 | npm pack 23 | cd ../grpc-js-xds 24 | npm pack 25 | cd ../proto-loader 26 | npm pack 27 | 28 | cd $base 29 | npm install ../../packages/grpc-js/grpc-grpc-js-*.tgz 30 | npm install ../../packages/grpc-js-xds/grpc-grpc-js-xds-*.tgz 31 | npm install ../../packages/proto-loader/grpc-proto-loader-*.tgz 32 | 33 | node ./distrib-test.js 34 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimePercent.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/base.proto 2 | 3 | import type { Percent as _envoy_type_v3_Percent, Percent__Output as _envoy_type_v3_Percent__Output } from '../../../../envoy/type/v3/Percent'; 4 | 5 | /** 6 | * Runtime derived percentage with a default when not specified. 7 | */ 8 | export interface RuntimePercent { 9 | /** 10 | * Default value if runtime value is not available. 11 | */ 12 | 'default_value'?: (_envoy_type_v3_Percent | null); 13 | /** 14 | * Runtime key to get value for comparison. This value is used if defined. 15 | */ 16 | 'runtime_key'?: (string); 17 | } 18 | 19 | /** 20 | * Runtime derived percentage with a default when not specified. 21 | */ 22 | export interface RuntimePercent__Output { 23 | /** 24 | * Default value if runtime value is not available. 25 | */ 26 | 'default_value': (_envoy_type_v3_Percent__Output | null); 27 | /** 28 | * Runtime key to get value for comparison. This value is used if defined. 29 | */ 30 | 'runtime_key': (string); 31 | } 32 | -------------------------------------------------------------------------------- /packages/proto-loader/golden-generated/google/protobuf/EnumOptions.ts: -------------------------------------------------------------------------------- 1 | // Original file: null 2 | 3 | import type { IFeatureSet as I_google_protobuf_FeatureSet, OFeatureSet as O_google_protobuf_FeatureSet } from '../../google/protobuf/FeatureSet'; 4 | import type { IUninterpretedOption as I_google_protobuf_UninterpretedOption, OUninterpretedOption as O_google_protobuf_UninterpretedOption } from '../../google/protobuf/UninterpretedOption'; 5 | 6 | export interface IEnumOptions { 7 | 'allowAlias'?: (boolean); 8 | 'deprecated'?: (boolean); 9 | /** 10 | * @deprecated 11 | */ 12 | 'deprecatedLegacyJsonFieldConflicts'?: (boolean); 13 | 'features'?: (I_google_protobuf_FeatureSet | null); 14 | 'uninterpretedOption'?: (I_google_protobuf_UninterpretedOption)[]; 15 | } 16 | 17 | export interface OEnumOptions { 18 | 'allowAlias': (boolean); 19 | 'deprecated': (boolean); 20 | /** 21 | * @deprecated 22 | */ 23 | 'deprecatedLegacyJsonFieldConflicts': (boolean); 24 | 'features': (O_google_protobuf_FeatureSet | null); 25 | 'uninterpretedOption': (O_google_protobuf_UninterpretedOption)[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/proto/grpc/testing/empty.proto: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2015 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 | syntax = "proto3"; 17 | 18 | package grpc.testing; 19 | 20 | // An empty message that you can re-use to avoid defining duplicated empty 21 | // messages in your project. A typical example is to use it as argument or the 22 | // return value of a service API. For instance: 23 | // 24 | // service Foo { 25 | // rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; 26 | // }; 27 | // 28 | message Empty {} 29 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/envoy/config/core/v3/EventServiceConfig.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/envoy-api/envoy/config/core/v3/event_service_config.proto 2 | 3 | import type { GrpcService as _envoy_config_core_v3_GrpcService, GrpcService__Output as _envoy_config_core_v3_GrpcService__Output } from '../../../../envoy/config/core/v3/GrpcService'; 4 | 5 | /** 6 | * [#not-implemented-hide:] 7 | * Configuration of the event reporting service endpoint. 8 | */ 9 | export interface EventServiceConfig { 10 | /** 11 | * Specifies the gRPC service that hosts the event reporting service. 12 | */ 13 | 'grpc_service'?: (_envoy_config_core_v3_GrpcService | null); 14 | 'config_source_specifier'?: "grpc_service"; 15 | } 16 | 17 | /** 18 | * [#not-implemented-hide:] 19 | * Configuration of the event reporting service endpoint. 20 | */ 21 | export interface EventServiceConfig__Output { 22 | /** 23 | * Specifies the gRPC service that hosts the event reporting service. 24 | */ 25 | 'grpc_service'?: (_envoy_config_core_v3_GrpcService__Output | null); 26 | 'config_source_specifier'?: "grpc_service"; 27 | } 28 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/src/generated/udpa/annotations/FieldSecurityAnnotation.ts: -------------------------------------------------------------------------------- 1 | // Original file: deps/xds/udpa/annotations/security.proto 2 | 3 | 4 | /** 5 | * These annotations indicate metadata for the purpose of understanding the 6 | * security significance of fields. 7 | */ 8 | export interface FieldSecurityAnnotation { 9 | /** 10 | * Field should be set in the presence of untrusted downstreams. 11 | */ 12 | 'configure_for_untrusted_downstream'?: (boolean); 13 | /** 14 | * Field should be set in the presence of untrusted upstreams. 15 | */ 16 | 'configure_for_untrusted_upstream'?: (boolean); 17 | } 18 | 19 | /** 20 | * These annotations indicate metadata for the purpose of understanding the 21 | * security significance of fields. 22 | */ 23 | export interface FieldSecurityAnnotation__Output { 24 | /** 25 | * Field should be set in the presence of untrusted downstreams. 26 | */ 27 | 'configure_for_untrusted_downstream': (boolean); 28 | /** 29 | * Field should be set in the presence of untrusted upstreams. 30 | */ 31 | 'configure_for_untrusted_upstream': (boolean); 32 | } 33 | -------------------------------------------------------------------------------- /packages/grpc-js/test/fixtures/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICzDCCAjWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJVUzER 3 | MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4 4 | YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wHhcNMjQxMTE0 5 | MDEzMjM3WhcNNDQxMTA5MDEzMjM3WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMI 6 | SWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENv 7 | LjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD 8 | gY0AMIGJAoGBAOHDFScoLCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlu 9 | mN+fm+AjPEK5GHhGn1BgzkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wH 10 | NVX77fBZOgp9VlSMVfyd9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGj 11 | gYswgYgwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0 12 | Lmdvb2dsZS5mcoIYd2F0ZXJ6b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91 13 | dHViZS5jb22HBMCoAQMwHQYDVR0OBBYEFI50QV/hcKkD2qyS/Melvq16+zY8MA0G 14 | CSqGSIb3DQEBCwUAA4GBAIxvZ4kg9HAvzM31p4J04h1MFfnDx8O4Hwogzpaqk+0M 15 | qz8L1ojJy5jus1g8+RBguT1rv5TmRFpMWrp50XQ0bMFHoOcNyL0htxoOhmoKHoX9 16 | dM0KWtgUheeBcEm83UzFFlGKlna22+pdUHLEnuX+i25s+Lbi4/LGf6KwUlgPL/Vk 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /test/kokoro/psm-light.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2024 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/packages/grpc-js-xds/scripts/psm-interop-test-node.sh" 19 | timeout_mins: 360 20 | action { 21 | define_artifacts { 22 | regex: "artifacts/**/*sponge_log.xml" 23 | regex: "artifacts/**/*.log" 24 | strip_prefix: "artifacts" 25 | } 26 | } 27 | env_vars { 28 | key: "PSM_TEST_SUITE" 29 | value: "light" 30 | } 31 | -------------------------------------------------------------------------------- /test/kokoro/xds_k8s_lb.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2022 gRPC authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for Kokoro (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-node/packages/grpc-js-xds/scripts/psm-interop-test-node.sh" 19 | timeout_mins: 360 20 | action { 21 | define_artifacts { 22 | regex: "artifacts/**/*sponge_log.xml" 23 | regex: "artifacts/**/*.log" 24 | strip_prefix: "artifacts" 25 | } 26 | } 27 | env_vars { 28 | key: "PSM_TEST_SUITE" 29 | value: "lb" 30 | } 31 | -------------------------------------------------------------------------------- /examples/debugging/README.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | 3 | Currently, grpc provides two major tools to help user debug issues, which are logging and channelz. 4 | 5 | ## Logs 6 | 7 | gRPC has put substantial logging instruments on critical paths of gRPC to help users debug issues. The [Environment Variables](https://github.com/grpc/grpc-node/blob/master/doc/environment_variables.md) doc describes the environment variables that control debug logging. 8 | 9 | To enable full debug logging, run the code with the following environment variables: `GRPC_TRACE=all GRPC_VERBOSITY=DEBUG`. 10 | 11 | ## Channelz 12 | 13 | We also provide a runtime debugging tool, Channelz, to help users with live debugging. 14 | 15 | See the channelz blog post here ([link](https://grpc.io/blog/a-short-introduction-to-channelz/)) for details about how to use channelz service to debug live program. 16 | 17 | ## Try it 18 | 19 | The example is able to showcase how logging and channelz can help with debugging. See the channelz blog post linked above for full explanation. 20 | 21 | ``` 22 | node server.js 23 | ``` 24 | 25 | ``` 26 | node client.js 27 | ``` 28 | -------------------------------------------------------------------------------- /packages/grpc-js-xds/test/fixtures/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICzDCCAjWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJVUzER 3 | MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4 4 | YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wHhcNMjQxMTE0 5 | MDEzMjM3WhcNNDQxMTA5MDEzMjM3WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMI 6 | SWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENv 7 | LjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD 8 | gY0AMIGJAoGBAOHDFScoLCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlu 9 | mN+fm+AjPEK5GHhGn1BgzkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wH 10 | NVX77fBZOgp9VlSMVfyd9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGj 11 | gYswgYgwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0 12 | Lmdvb2dsZS5mcoIYd2F0ZXJ6b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91 13 | dHViZS5jb22HBMCoAQMwHQYDVR0OBBYEFI50QV/hcKkD2qyS/Melvq16+zY8MA0G 14 | CSqGSIb3DQEBCwUAA4GBAIxvZ4kg9HAvzM31p4J04h1MFfnDx8O4Hwogzpaqk+0M 15 | qz8L1ojJy5jus1g8+RBguT1rv5TmRFpMWrp50XQ0bMFHoOcNyL0htxoOhmoKHoX9 16 | dM0KWtgUheeBcEm83UzFFlGKlna22+pdUHLEnuX+i25s+Lbi4/LGf6KwUlgPL/Vk 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /packages/grpc-js/test/fixtures/server1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICzDCCAjWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJVUzER 3 | MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4 4 | YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wHhcNMjQxMTE0 5 | MDEzMjM3WhcNNDQxMTA5MDEzMjM3WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMI 6 | SWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENv 7 | LjEaMBgGA1UEAxQRKi50ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD 8 | gY0AMIGJAoGBAOHDFScoLCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlu 9 | mN+fm+AjPEK5GHhGn1BgzkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wH 10 | NVX77fBZOgp9VlSMVfyd9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGj 11 | gYswgYgwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0 12 | Lmdvb2dsZS5mcoIYd2F0ZXJ6b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91 13 | dHViZS5jb22HBMCoAQMwHQYDVR0OBBYEFI50QV/hcKkD2qyS/Melvq16+zY8MA0G 14 | CSqGSIb3DQEBCwUAA4GBAIxvZ4kg9HAvzM31p4J04h1MFfnDx8O4Hwogzpaqk+0M 15 | qz8L1ojJy5jus1g8+RBguT1rv5TmRFpMWrp50XQ0bMFHoOcNyL0htxoOhmoKHoX9 16 | dM0KWtgUheeBcEm83UzFFlGKlna22+pdUHLEnuX+i25s+Lbi4/LGf6KwUlgPL/Vk 17 | -----END CERTIFICATE----- 18 | --------------------------------------------------------------------------------