├── .bazelignore ├── .bazelrc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── ask_question.md │ ├── bug_report.md │ └── feature_report.md └── workflows │ ├── branch-testing.yml │ ├── gradle-wrapper-validation.yml │ ├── lock.yml │ └── testing.yml ├── .gitignore ├── AUTHORS ├── BUILD.bazel ├── CODE-OF-CONDUCT.md ├── COMPILING.md ├── CONTRIBUTING.md ├── GOVERNANCE.md ├── LICENSE ├── MAINTAINERS.md ├── MODULE.bazel ├── NOTICE.txt ├── README.md ├── RELEASING.md ├── SECURITY.md ├── WORKSPACE ├── WORKSPACE.bzlmod ├── all └── build.gradle ├── alts ├── BUILD.bazel ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── alts │ │ └── internal │ │ └── HandshakerServiceGrpc.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── alts │ │ │ ├── AltsChannelBuilder.java │ │ │ ├── AltsChannelCredentials.java │ │ │ ├── AltsContext.java │ │ │ ├── AltsContextUtil.java │ │ │ ├── AltsServerBuilder.java │ │ │ ├── AltsServerCredentials.java │ │ │ ├── AuthorizationUtil.java │ │ │ ├── ComputeEngineChannelBuilder.java │ │ │ ├── ComputeEngineChannelCredentials.java │ │ │ ├── DualCallCredentials.java │ │ │ ├── FailingCallCredentials.java │ │ │ ├── FailingClientCall.java │ │ │ ├── GoogleDefaultChannelBuilder.java │ │ │ ├── GoogleDefaultChannelCredentials.java │ │ │ ├── HandshakerServiceChannel.java │ │ │ ├── InternalCheckGcpEnvironment.java │ │ │ └── internal │ │ │ ├── AeadCrypter.java │ │ │ ├── AesGcmAeadCrypter.java │ │ │ ├── AesGcmHkdfAeadCrypter.java │ │ │ ├── AltsChannelCrypter.java │ │ │ ├── AltsClientOptions.java │ │ │ ├── AltsFraming.java │ │ │ ├── AltsHandshakerClient.java │ │ │ ├── AltsHandshakerOptions.java │ │ │ ├── AltsHandshakerStub.java │ │ │ ├── AltsInternalContext.java │ │ │ ├── AltsProtocolNegotiator.java │ │ │ ├── AltsTsiFrameProtector.java │ │ │ ├── AltsTsiHandshaker.java │ │ │ ├── AsyncSemaphore.java │ │ │ ├── BufUnwrapper.java │ │ │ ├── ChannelCrypterNetty.java │ │ │ ├── NettyTsiHandshaker.java │ │ │ ├── ProtectedPromise.java │ │ │ ├── RpcProtocolVersionsUtil.java │ │ │ ├── TsiFrameHandler.java │ │ │ ├── TsiFrameProtector.java │ │ │ ├── TsiHandshakeHandler.java │ │ │ ├── TsiHandshaker.java │ │ │ ├── TsiHandshakerFactory.java │ │ │ └── TsiPeer.java │ └── proto │ │ └── grpc │ │ └── gcp │ │ ├── altscontext.proto │ │ ├── handshaker.proto │ │ └── transport_security_common.proto │ └── test │ └── java │ └── io │ └── grpc │ └── alts │ ├── AltsChannelBuilderTest.java │ ├── AltsContextUtilTest.java │ ├── AltsServerBuilderTest.java │ ├── AuthorizationUtilTest.java │ ├── ComputeEngineChannelBuilderTest.java │ ├── DualCallCredentialsTest.java │ ├── GoogleDefaultChannelBuilderTest.java │ ├── HandshakerServiceChannelTest.java │ ├── InternalCheckGcpEnvironmentTest.java │ └── internal │ ├── AesGcmAeadCrypterTest.java │ ├── AesGcmHkdfAeadCrypterTest.java │ ├── AltsChannelCrypterTest.java │ ├── AltsClientOptionsTest.java │ ├── AltsFramingTest.java │ ├── AltsHandshakerClientTest.java │ ├── AltsHandshakerOptionsTest.java │ ├── AltsHandshakerStubTest.java │ ├── AltsInternalContextTest.java │ ├── AltsProtocolNegotiatorTest.java │ ├── AltsTsiFrameProtectorTest.java │ ├── AltsTsiHandshakerTest.java │ ├── AltsTsiTest.java │ ├── BufUnwrapperTest.java │ ├── ByteBufTestUtils.java │ ├── ChannelCrypterNettyTestBase.java │ ├── FakeChannelCrypter.java │ ├── FakeTsiHandshaker.java │ ├── FakeTsiTest.java │ ├── GoogleDefaultProtocolNegotiatorTest.java │ ├── MockAltsHandshakerResp.java │ ├── NettyTsiHandshakerTest.java │ ├── RpcProtocolVersionsUtilTest.java │ ├── TsiFrameHandlerTest.java │ └── TsiTest.java ├── android-interop-testing ├── README.md ├── build.gradle ├── proguard-rules.pro ├── src │ ├── androidTest │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── io │ │ │ └── grpc │ │ │ └── android │ │ │ └── integrationtest │ │ │ ├── InteropInstrumentationTest.java │ │ │ └── UdsChannelInteropTest.java │ ├── generated │ │ ├── debug │ │ │ └── grpc │ │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── testing │ │ │ │ └── integration │ │ │ │ ├── LoadBalancerStatsServiceGrpc.java │ │ │ │ ├── MetricsServiceGrpc.java │ │ │ │ ├── ReconnectServiceGrpc.java │ │ │ │ ├── TestServiceGrpc.java │ │ │ │ ├── UnimplementedServiceGrpc.java │ │ │ │ ├── XdsUpdateClientConfigureServiceGrpc.java │ │ │ │ └── XdsUpdateHealthServiceGrpc.java │ │ └── release │ │ │ └── grpc │ │ │ └── io │ │ │ └── grpc │ │ │ └── testing │ │ │ └── integration │ │ │ ├── LoadBalancerStatsServiceGrpc.java │ │ │ ├── MetricsServiceGrpc.java │ │ │ ├── ReconnectServiceGrpc.java │ │ │ ├── TestServiceGrpc.java │ │ │ ├── UnimplementedServiceGrpc.java │ │ │ ├── XdsUpdateClientConfigureServiceGrpc.java │ │ │ └── XdsUpdateHealthServiceGrpc.java │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── android │ │ │ └── integrationtest │ │ │ ├── TestCallable.java │ │ │ ├── TesterActivity.java │ │ │ ├── TesterOkHttpChannelBuilder.java │ │ │ └── UdsTcpEndpointConnector.java │ │ └── res │ │ ├── color │ │ └── focus.xml │ │ ├── layout │ │ └── activity_tester.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── ca.pem │ │ └── values │ │ └── strings.xml ├── start-emulator.sh └── wait-for-emulator.sh ├── android ├── build.gradle └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── io │ │ └── grpc │ │ └── android │ │ ├── AndroidChannelBuilder.java │ │ ├── UdsChannelBuilder.java │ │ ├── UdsSocket.java │ │ └── UdsSocketFactory.java │ └── test │ └── java │ └── io │ └── grpc │ └── android │ └── AndroidChannelBuilderTest.java ├── api ├── BUILD.bazel ├── build.gradle └── src │ ├── context │ └── java │ │ └── io │ │ └── grpc │ │ ├── Context.java │ │ ├── Deadline.java │ │ ├── PersistentHashArrayMappedTrie.java │ │ └── ThreadLocalContextStorage.java │ ├── jmh │ └── java │ │ └── io │ │ └── grpc │ │ ├── AttachDetachBenchmark.java │ │ ├── AttributesBenchmark.java │ │ ├── CallOptionsBenchmark.java │ │ ├── DecompressorRegistryBenchmark.java │ │ ├── ReadBenchmark.java │ │ ├── StatusBenchmark.java │ │ └── WriteBenchmark.java │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ ├── Attributes.java │ │ ├── BinaryLog.java │ │ ├── BindableService.java │ │ ├── CallCredentials.java │ │ ├── CallOptions.java │ │ ├── CallbackMetricInstrument.java │ │ ├── Channel.java │ │ ├── ChannelCredentials.java │ │ ├── ChannelLogger.java │ │ ├── ChoiceChannelCredentials.java │ │ ├── ChoiceServerCredentials.java │ │ ├── ClientCall.java │ │ ├── ClientInterceptor.java │ │ ├── ClientInterceptors.java │ │ ├── ClientStreamTracer.java │ │ ├── ClientTransportFilter.java │ │ ├── Codec.java │ │ ├── CompositeCallCredentials.java │ │ ├── CompositeChannelCredentials.java │ │ ├── Compressor.java │ │ ├── CompressorRegistry.java │ │ ├── Configurator.java │ │ ├── ConfiguratorRegistry.java │ │ ├── ConnectivityState.java │ │ ├── ConnectivityStateInfo.java │ │ ├── Contexts.java │ │ ├── Decompressor.java │ │ ├── DecompressorRegistry.java │ │ ├── Detachable.java │ │ ├── DoubleCounterMetricInstrument.java │ │ ├── DoubleHistogramMetricInstrument.java │ │ ├── Drainable.java │ │ ├── EquivalentAddressGroup.java │ │ ├── ExperimentalApi.java │ │ ├── ForwardingChannelBuilder.java │ │ ├── ForwardingChannelBuilder2.java │ │ ├── ForwardingClientCall.java │ │ ├── ForwardingClientCallListener.java │ │ ├── ForwardingServerBuilder.java │ │ ├── ForwardingServerCall.java │ │ ├── ForwardingServerCallListener.java │ │ ├── Grpc.java │ │ ├── HandlerRegistry.java │ │ ├── HasByteBuffer.java │ │ ├── HttpConnectProxiedSocketAddress.java │ │ ├── IgnoreJRERequirement.java │ │ ├── InsecureChannelCredentials.java │ │ ├── InsecureServerCredentials.java │ │ ├── Internal.java │ │ ├── InternalCallOptions.java │ │ ├── InternalChannelz.java │ │ ├── InternalClientInterceptors.java │ │ ├── InternalConfigSelector.java │ │ ├── InternalConfigurator.java │ │ ├── InternalConfiguratorRegistry.java │ │ ├── InternalDecompressorRegistry.java │ │ ├── InternalInstrumented.java │ │ ├── InternalKnownTransport.java │ │ ├── InternalLogId.java │ │ ├── InternalManagedChannelBuilder.java │ │ ├── InternalManagedChannelProvider.java │ │ ├── InternalMayRequireSpecificExecutor.java │ │ ├── InternalMetadata.java │ │ ├── InternalMethodDescriptor.java │ │ ├── InternalServer.java │ │ ├── InternalServerInterceptors.java │ │ ├── InternalServerProvider.java │ │ ├── InternalServiceProviders.java │ │ ├── InternalStatus.java │ │ ├── InternalStatusRuntimeException.java │ │ ├── InternalSubchannelAddressAttributes.java │ │ ├── InternalTimeUtils.java │ │ ├── InternalWithLogId.java │ │ ├── KnownLength.java │ │ ├── LoadBalancer.java │ │ ├── LoadBalancerProvider.java │ │ ├── LoadBalancerRegistry.java │ │ ├── LongCounterMetricInstrument.java │ │ ├── LongGaugeMetricInstrument.java │ │ ├── LongHistogramMetricInstrument.java │ │ ├── ManagedChannel.java │ │ ├── ManagedChannelBuilder.java │ │ ├── ManagedChannelProvider.java │ │ ├── ManagedChannelRegistry.java │ │ ├── Metadata.java │ │ ├── MethodDescriptor.java │ │ ├── MetricInstrument.java │ │ ├── MetricInstrumentRegistry.java │ │ ├── MetricRecorder.java │ │ ├── MetricSink.java │ │ ├── NameResolver.java │ │ ├── NameResolverProvider.java │ │ ├── NameResolverRegistry.java │ │ ├── PartialForwardingClientCall.java │ │ ├── PartialForwardingClientCallListener.java │ │ ├── PartialForwardingServerCall.java │ │ ├── PartialForwardingServerCallListener.java │ │ ├── PartialMetricInstrument.java │ │ ├── ProxiedSocketAddress.java │ │ ├── ProxyDetector.java │ │ ├── SecurityLevel.java │ │ ├── Server.java │ │ ├── ServerBuilder.java │ │ ├── ServerCall.java │ │ ├── ServerCallExecutorSupplier.java │ │ ├── ServerCallHandler.java │ │ ├── ServerCredentials.java │ │ ├── ServerInterceptor.java │ │ ├── ServerInterceptors.java │ │ ├── ServerMethodDefinition.java │ │ ├── ServerProvider.java │ │ ├── ServerRegistry.java │ │ ├── ServerServiceDefinition.java │ │ ├── ServerStreamTracer.java │ │ ├── ServerTransportFilter.java │ │ ├── ServiceDescriptor.java │ │ ├── ServiceProviders.java │ │ ├── Status.java │ │ ├── StatusException.java │ │ ├── StatusOr.java │ │ ├── StatusRuntimeException.java │ │ ├── StreamTracer.java │ │ ├── SynchronizationContext.java │ │ ├── TimeUtils.java │ │ ├── TlsChannelCredentials.java │ │ ├── TlsServerCredentials.java │ │ └── package-info.java │ ├── test │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ ├── AttributesTest.java │ │ │ ├── CallOptionsTest.java │ │ │ ├── ChoiceChannelCredentialsTest.java │ │ │ ├── ClientInterceptorsTest.java │ │ │ ├── ClientStreamTracerTest.java │ │ │ ├── CompositeCallCredentialsTest.java │ │ │ ├── CompositeChannelCredentialsTest.java │ │ │ ├── ConfiguratorRegistryTest.java │ │ │ ├── ConnectivityStateInfoTest.java │ │ │ ├── ContextTest.java │ │ │ ├── ContextsTest.java │ │ │ ├── DeadlineTest.java │ │ │ ├── DecompressorRegistryTest.java │ │ │ ├── ForwardingChannelBuilder2Test.java │ │ │ ├── ForwardingChannelBuilderTest.java │ │ │ ├── ForwardingScheduledExecutorService.java │ │ │ ├── ForwardingServerBuilderTest.java │ │ │ ├── ForwardingServerCallListenerTest.java │ │ │ ├── ForwardingServerCallTest.java │ │ │ ├── InsecureChannelCredentialsTest.java │ │ │ ├── InternalChannelzTest.java │ │ │ ├── InternalConfigSelectorTest.java │ │ │ ├── InternalLogIdTest.java │ │ │ ├── LoadBalancerRegistryTest.java │ │ │ ├── LoadBalancerTest.java │ │ │ ├── ManagedChannelRegistryTest.java │ │ │ ├── MetadataTest.java │ │ │ ├── MethodDescriptorTest.java │ │ │ ├── MetricInstrumentRegistryTest.java │ │ │ ├── NameResolverRegistryTest.java │ │ │ ├── NameResolverTest.java │ │ │ ├── PersistentHashArrayMappedTrieTest.java │ │ │ ├── ReplacingClassLoader.java │ │ │ ├── ServerInterceptorsTest.java │ │ │ ├── ServerRegistryTest.java │ │ │ ├── ServerServiceDefinitionTest.java │ │ │ ├── ServiceDescriptorTest.java │ │ │ ├── ServiceProvidersTest.java │ │ │ ├── ServiceProvidersTestAbstractProvider.java │ │ │ ├── ServiceProvidersTestUtil.java │ │ │ ├── StatusExceptionTest.java │ │ │ ├── StatusOrTest.java │ │ │ ├── StatusRuntimeExceptionTest.java │ │ │ ├── StatusTest.java │ │ │ ├── SynchronizationContextTest.java │ │ │ ├── ThreadLocalContextStorageTest.java │ │ │ ├── TimeUtilsTest.java │ │ │ └── TlsChannelCredentialsTest.java │ └── resources │ │ └── io │ │ └── grpc │ │ ├── ServiceProvidersTestAbstractProvider-empty.txt │ │ ├── ServiceProvidersTestAbstractProvider-failAtAvailableProvider.txt │ │ ├── ServiceProvidersTestAbstractProvider-failAtInitProvider.txt │ │ ├── ServiceProvidersTestAbstractProvider-failAtPriorityProvider.txt │ │ ├── ServiceProvidersTestAbstractProvider-multipleProvider.txt │ │ ├── ServiceProvidersTestAbstractProvider-unavailableProvider.txt │ │ └── ServiceProvidersTestAbstractProvider-unknownClassProvider.txt │ └── testFixtures │ └── java │ └── io │ └── grpc │ ├── ForwardingTestUtil.java │ ├── IntegerMarshaller.java │ ├── LoadBalancerMatchers.java │ ├── ManagedChannelRegistryAccessor.java │ ├── MetricInstrumentRegistryAccessor.java │ ├── NoopClientCall.java │ ├── NoopMetricSink.java │ ├── NoopServerCall.java │ ├── PickSubchannelArgsMatcher.java │ ├── ServerRegistryAccessor.java │ ├── StaticTestingClassLoader.java │ ├── StatusMatcher.java │ ├── StatusOrMatcher.java │ ├── StringMarshaller.java │ └── testing │ └── DeadlineSubject.java ├── auth ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── auth │ │ ├── ClientAuthInterceptor.java │ │ ├── GoogleAuthLibraryCallCredentials.java │ │ ├── MoreCallCredentials.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── grpc │ └── auth │ ├── ClientAuthInterceptorTest.java │ └── GoogleAuthLibraryCallCredentialsTest.java ├── authz ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── authz │ │ ├── AuthorizationPolicyTranslator.java │ │ ├── AuthorizationServerInterceptor.java │ │ └── FileWatcherAuthorizationServerInterceptor.java │ └── test │ └── java │ └── io │ └── grpc │ └── authz │ ├── AuthorizationEnd2EndTest.java │ ├── AuthorizationPolicyTranslatorTest.java │ ├── AuthorizationServerInterceptorTest.java │ └── FileWatcherAuthorizationServerInterceptorTest.java ├── benchmarks ├── README.md ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── benchmarks │ │ └── proto │ │ ├── BenchmarkServiceGrpc.java │ │ ├── ReportQpsScenarioServiceGrpc.java │ │ └── WorkerServiceGrpc.java │ ├── jmh │ └── java │ │ └── io │ │ └── grpc │ │ └── benchmarks │ │ ├── CancellableInterceptor.java │ │ ├── ThreadlessExecutor.java │ │ ├── TransportBenchmark.java │ │ └── netty │ │ ├── AbstractBenchmark.java │ │ ├── StreamingPingPongsPerSecondBenchmark.java │ │ └── UnaryCallQpsBenchmark.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── benchmarks │ │ │ ├── ByteBufInputStream.java │ │ │ ├── ByteBufOutputMarshaller.java │ │ │ ├── SocketAddressValidator.java │ │ │ ├── Transport.java │ │ │ ├── Utils.java │ │ │ ├── driver │ │ │ ├── LoadClient.java │ │ │ ├── LoadServer.java │ │ │ └── LoadWorker.java │ │ │ └── qps │ │ │ ├── AbstractConfigurationBuilder.java │ │ │ ├── AsyncClient.java │ │ │ ├── AsyncServer.java │ │ │ ├── ClientConfiguration.java │ │ │ ├── Configuration.java │ │ │ ├── OpenLoopClient.java │ │ │ └── ServerConfiguration.java │ └── proto │ │ └── grpc │ │ └── testing │ │ ├── control.proto │ │ ├── messages.proto │ │ ├── payloads.proto │ │ ├── services.proto │ │ └── stats.proto │ └── test │ └── java │ └── io │ └── grpc │ └── benchmarks │ └── driver │ ├── LoadClientTest.java │ └── LoadWorkerTest.java ├── binder ├── build.gradle └── src │ ├── androidTest │ ├── AndroidManifest.xml │ └── java │ │ └── io │ │ └── grpc │ │ └── binder │ │ ├── BinderChannelSmokeTest.java │ │ ├── BinderSecurityTest.java │ │ ├── HostServices.java │ │ └── internal │ │ ├── BinderClientTransportTest.java │ │ ├── BinderTransportTest.java │ │ ├── LeakSafeOneWayBinderTest.java │ │ └── OneWayBinderProxies.java │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── io │ │ └── grpc │ │ └── binder │ │ ├── AndroidComponentAddress.java │ │ ├── ApiConstants.java │ │ ├── AsyncSecurityPolicy.java │ │ ├── BindServiceFlags.java │ │ ├── BinderChannelBuilder.java │ │ ├── BinderChannelCredentials.java │ │ ├── BinderInternal.java │ │ ├── BinderServerBuilder.java │ │ ├── IBinderReceiver.java │ │ ├── InboundParcelablePolicy.java │ │ ├── LifecycleOnDestroyHelper.java │ │ ├── ParcelableUtils.java │ │ ├── PeerUid.java │ │ ├── PeerUids.java │ │ ├── SecurityPolicies.java │ │ ├── SecurityPolicy.java │ │ ├── ServerSecurityPolicy.java │ │ ├── UntrustedSecurityPolicies.java │ │ └── internal │ │ ├── ActiveTransportTracker.java │ │ ├── Bindable.java │ │ ├── BinderClientTransportFactory.java │ │ ├── BinderServer.java │ │ ├── BinderTransport.java │ │ ├── BinderTransportSecurity.java │ │ ├── BlockInputStream.java │ │ ├── BlockPool.java │ │ ├── BoundClientAddress.java │ │ ├── FlowController.java │ │ ├── Inbound.java │ │ ├── LeakSafeOneWayBinder.java │ │ ├── MetadataHelper.java │ │ ├── MultiMessageClientStream.java │ │ ├── MultiMessageServerStream.java │ │ ├── OneWayBinderProxy.java │ │ ├── Outbound.java │ │ ├── ParcelHolder.java │ │ ├── ParcelableInputStream.java │ │ ├── PendingAuthListener.java │ │ ├── PingTracker.java │ │ ├── ServiceBinding.java │ │ ├── SingleMessageClientStream.java │ │ ├── SingleMessageServerStream.java │ │ └── TransactionUtils.java │ ├── test │ └── java │ │ └── io │ │ └── grpc │ │ └── binder │ │ ├── AndroidComponentAddressTest.java │ │ ├── BindServiceFlagsTest.java │ │ ├── BinderChannelBuilderTest.java │ │ ├── BinderChannelCredentialsTest.java │ │ ├── BinderServerBuilderTest.java │ │ ├── LifecycleOnDestroyHelperTest.java │ │ ├── PeerUidTest.java │ │ ├── PeerUidTestHelperTest.java │ │ ├── PeerUidsTest.java │ │ ├── RobolectricBinderSecurityTest.java │ │ ├── SecurityPoliciesTest.java │ │ ├── ServerSecurityPolicyTest.java │ │ └── internal │ │ ├── ActiveTransportTrackerTest.java │ │ ├── BinderServerTransportTest.java │ │ ├── BlockInputStreamTest.java │ │ ├── BoundClientAddressTest.java │ │ ├── FlowControllerTest.java │ │ ├── OneWayBinderProxyTest.java │ │ ├── ParcelableInputStreamTest.java │ │ ├── PendingAuthListenerTest.java │ │ ├── PingTrackerTest.java │ │ ├── RobolectricBinderTransportTest.java │ │ ├── ServiceBindingTest.java │ │ └── TestParcelable.java │ └── testFixtures │ └── java │ └── io │ └── grpc │ └── binder │ ├── PeerUidTestHelper.java │ └── internal │ └── MainThreadScheduledExecutorService.java ├── bom └── build.gradle ├── build.gradle ├── buildSrc ├── build.gradle └── src │ └── main │ └── java │ └── io │ └── grpc │ └── gradle │ ├── CheckForUpdatesTask.java │ ├── CheckPackageLeakageTask.java │ └── RequireUpperBoundDepsMatchTask.java ├── buildscripts ├── build_artifacts_in_docker.sh ├── build_docker.sh ├── checkstyle.license ├── checkstyle.xml ├── grpc-java-artifacts │ ├── Dockerfile │ ├── Dockerfile.multiarch.base │ └── Dockerfile.ubuntu2004.base ├── kokoro │ ├── android-interop.cfg │ ├── android-interop.sh │ ├── android.cfg │ ├── android.sh │ ├── gae-interop.cfg │ ├── gae-interop.sh │ ├── kokoro.sh │ ├── linux_artifacts.cfg │ ├── linux_artifacts.sh │ ├── macos.cfg │ ├── macos.sh │ ├── psm-cloud-run.cfg │ ├── psm-csm.cfg │ ├── psm-dualstack.cfg │ ├── psm-interop-build-java.sh │ ├── psm-interop-test-java.sh │ ├── psm-light.cfg │ ├── psm-security.cfg │ ├── release_artifacts.cfg │ ├── release_artifacts.sh │ ├── unix.sh │ ├── upload_artifacts.cfg │ ├── upload_artifacts.sh │ ├── windows.bat │ ├── windows.cfg │ ├── windows32.bat │ ├── windows64.bat │ ├── xds_k8s_lb.cfg │ ├── xds_url_map.cfg │ ├── xds_v3.cfg │ └── xds_v3.sh ├── make_dependencies.bat ├── make_dependencies.sh ├── observability-test │ ├── Dockerfile │ ├── build_docker.sh │ └── run.sh ├── run_in_docker.sh ├── sign-local-repo.sh ├── sonatype-upload.sh ├── sync-protos.sh ├── toolchain.cmake ├── xds-k8s │ ├── cloudbuild.yaml │ ├── logging-debug.properties │ ├── logging-json.properties │ ├── logging.properties │ ├── test-client.Dockerfile │ └── test-server.Dockerfile └── xds_logging.properties ├── census ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── census │ │ ├── CensusStatsModule.java │ │ ├── CensusTracingModule.java │ │ ├── InternalCensusStatsAccessor.java │ │ ├── InternalCensusTracingAccessor.java │ │ └── internal │ │ ├── DeprecatedCensusConstants.java │ │ └── ObservabilityCensusConstants.java │ └── test │ └── java │ └── io │ └── grpc │ └── census │ ├── CensusModulesTest.java │ └── CensusTracingAnnotationEventTest.java ├── codecov.yml ├── compiler ├── BUILD.bazel ├── README.md ├── build.gradle ├── check-artifact.sh └── src │ ├── java_plugin │ └── cpp │ │ ├── java_generator.cpp │ │ ├── java_generator.h │ │ └── java_plugin.cpp │ ├── test │ ├── golden │ │ ├── TestDeprecatedService.java.txt │ │ └── TestService.java.txt │ └── proto │ │ └── grpc │ │ └── testing │ │ └── compiler │ │ └── test.proto │ └── testLite │ └── golden │ ├── TestDeprecatedService.java.txt │ └── TestService.java.txt ├── context ├── BUILD.bazel └── build.gradle ├── contextstorage ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── override │ │ ├── ContextStorageOverride.java │ │ └── OpenTelemetryContextStorage.java │ └── test │ └── java │ └── io │ └── grpc │ └── override │ └── OpenTelemetryContextStorageTest.java ├── core ├── BUILD.bazel ├── build.gradle └── src │ ├── bazel-internal │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── io.grpc.LoadBalancerProvider │ │ └── io.grpc.NameResolverProvider │ ├── jmh │ └── java │ │ └── io │ │ └── grpc │ │ └── internal │ │ ├── ChannelzBenchmark.java │ │ ├── SerializingExecutorBenchmark.java │ │ └── StatsTraceContextBenchmark.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── internal │ │ │ ├── AbstractClientStream.java │ │ │ ├── AbstractReadableBuffer.java │ │ │ ├── AbstractServerStream.java │ │ │ ├── AbstractStream.java │ │ │ ├── AbstractSubchannel.java │ │ │ ├── ApplicationThreadDeframer.java │ │ │ ├── ApplicationThreadDeframerListener.java │ │ │ ├── AtomicBackoff.java │ │ │ ├── AtomicLongCounter.java │ │ │ ├── AuthorityVerifier.java │ │ │ ├── AutoConfiguredLoadBalancerFactory.java │ │ │ ├── BackoffPolicy.java │ │ │ ├── BackoffPolicyRetryScheduler.java │ │ │ ├── CallCredentialsApplyingTransportFactory.java │ │ │ ├── CallTracer.java │ │ │ ├── CertificateUtils.java │ │ │ ├── ChannelLoggerImpl.java │ │ │ ├── ChannelTracer.java │ │ │ ├── ClientCallImpl.java │ │ │ ├── ClientStream.java │ │ │ ├── ClientStreamListener.java │ │ │ ├── ClientTransport.java │ │ │ ├── ClientTransportFactory.java │ │ │ ├── CompositeReadableBuffer.java │ │ │ ├── ConcurrentTimeProvider.java │ │ │ ├── ConnectionClientTransport.java │ │ │ ├── ConnectivityStateManager.java │ │ │ ├── ConscryptLoader.java │ │ │ ├── ContextRunnable.java │ │ │ ├── Deframer.java │ │ │ ├── DelayedClientCall.java │ │ │ ├── DelayedClientTransport.java │ │ │ ├── DelayedStream.java │ │ │ ├── DnsNameResolver.java │ │ │ ├── DnsNameResolverProvider.java │ │ │ ├── ExponentialBackoffPolicy.java │ │ │ ├── FailingClientStream.java │ │ │ ├── FailingClientTransport.java │ │ │ ├── FixedObjectPool.java │ │ │ ├── ForwardingClientStream.java │ │ │ ├── ForwardingClientStreamListener.java │ │ │ ├── ForwardingClientStreamTracer.java │ │ │ ├── ForwardingConnectionClientTransport.java │ │ │ ├── ForwardingDeframerListener.java │ │ │ ├── ForwardingManagedChannel.java │ │ │ ├── ForwardingNameResolver.java │ │ │ ├── ForwardingReadableBuffer.java │ │ │ ├── Framer.java │ │ │ ├── GrpcAttributes.java │ │ │ ├── GrpcUtil.java │ │ │ ├── GzipInflatingBuffer.java │ │ │ ├── HedgingPolicy.java │ │ │ ├── Http2ClientStreamTransportState.java │ │ │ ├── Http2Ping.java │ │ │ ├── InUseStateAggregator.java │ │ │ ├── InsightBuilder.java │ │ │ ├── InstantTimeProvider.java │ │ │ ├── InternalHandlerRegistry.java │ │ │ ├── InternalServer.java │ │ │ ├── InternalSubchannel.java │ │ │ ├── JndiResourceResolverFactory.java │ │ │ ├── JsonParser.java │ │ │ ├── JsonUtil.java │ │ │ ├── KeepAliveEnforcer.java │ │ │ ├── KeepAliveManager.java │ │ │ ├── LogExceptionRunnable.java │ │ │ ├── LongCounter.java │ │ │ ├── LongCounterFactory.java │ │ │ ├── ManagedChannelImpl.java │ │ │ ├── ManagedChannelImplBuilder.java │ │ │ ├── ManagedChannelOrphanWrapper.java │ │ │ ├── ManagedChannelServiceConfig.java │ │ │ ├── ManagedClientTransport.java │ │ │ ├── MaxConnectionIdleManager.java │ │ │ ├── MessageDeframer.java │ │ │ ├── MessageFramer.java │ │ │ ├── MetadataApplierImpl.java │ │ │ ├── MetricRecorderImpl.java │ │ │ ├── MigratingThreadDeframer.java │ │ │ ├── NameResolverFactoryToProviderFacade.java │ │ │ ├── NoopClientStream.java │ │ │ ├── NoopSslSession.java │ │ │ ├── ObjectPool.java │ │ │ ├── OobChannel.java │ │ │ ├── PickDetailsConsumerImpl.java │ │ │ ├── PickFirstLeafLoadBalancer.java │ │ │ ├── PickFirstLoadBalancer.java │ │ │ ├── PickFirstLoadBalancerProvider.java │ │ │ ├── PickSubchannelArgsImpl.java │ │ │ ├── ProxyDetectorImpl.java │ │ │ ├── ReadableBuffer.java │ │ │ ├── ReadableBuffers.java │ │ │ ├── ReflectionLongAdderCounter.java │ │ │ ├── Rescheduler.java │ │ │ ├── RetriableStream.java │ │ │ ├── RetryPolicy.java │ │ │ ├── RetryScheduler.java │ │ │ ├── RetryingNameResolver.java │ │ │ ├── ScParser.java │ │ │ ├── SerializeReentrantCallsDirectExecutor.java │ │ │ ├── SerializingExecutor.java │ │ │ ├── ServerCallImpl.java │ │ │ ├── ServerCallInfoImpl.java │ │ │ ├── ServerImpl.java │ │ │ ├── ServerImplBuilder.java │ │ │ ├── ServerListener.java │ │ │ ├── ServerStream.java │ │ │ ├── ServerStreamListener.java │ │ │ ├── ServerTransport.java │ │ │ ├── ServerTransportListener.java │ │ │ ├── ServiceConfigState.java │ │ │ ├── ServiceConfigUtil.java │ │ │ ├── SharedResourceHolder.java │ │ │ ├── SharedResourcePool.java │ │ │ ├── SpiffeUtil.java │ │ │ ├── SquelchLateMessagesAvailableDeframerListener.java │ │ │ ├── StatsTraceContext.java │ │ │ ├── Stream.java │ │ │ ├── StreamListener.java │ │ │ ├── SubchannelChannel.java │ │ │ ├── ThreadOptimizedDeframer.java │ │ │ ├── TimeProvider.java │ │ │ ├── TimeProviderResolverFactory.java │ │ │ ├── TransportFrameUtil.java │ │ │ ├── TransportProvider.java │ │ │ ├── TransportTracer.java │ │ │ ├── WritableBuffer.java │ │ │ ├── WritableBufferAllocator.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── io.grpc.LoadBalancerProvider │ │ └── io.grpc.NameResolverProvider │ ├── test │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── internal │ │ │ ├── AbstractClientStreamTest.java │ │ │ ├── AbstractReadableBufferTest.java │ │ │ ├── AbstractServerStreamTest.java │ │ │ ├── ApplicationThreadDeframerTest.java │ │ │ ├── AtomicBackoffTest.java │ │ │ ├── AutoConfiguredLoadBalancerFactoryTest.java │ │ │ ├── BackoffPolicyRetrySchedulerTest.java │ │ │ ├── ByteWritableBufferTest.java │ │ │ ├── CallCredentialsApplyingTest.java │ │ │ ├── ChannelLoggerImplTest.java │ │ │ ├── ChannelTracerTest.java │ │ │ ├── ClientCallImplTest.java │ │ │ ├── ClientTransportFactoryTest.java │ │ │ ├── CompositeReadableBufferTest.java │ │ │ ├── ConcurrentTimeProviderTest.java │ │ │ ├── ConfigSelectingClientCallTest.java │ │ │ ├── ConnectivityStateManagerTest.java │ │ │ ├── DelayedClientCallTest.java │ │ │ ├── DelayedClientTransportTest.java │ │ │ ├── DelayedStreamTest.java │ │ │ ├── DnsNameResolverProviderTest.java │ │ │ ├── DnsNameResolverTest.java │ │ │ ├── ExponentialBackoffPolicyTest.java │ │ │ ├── FailingClientStreamTest.java │ │ │ ├── FailingClientTransportTest.java │ │ │ ├── FakeCallCredentials.java │ │ │ ├── FakeClockTest.java │ │ │ ├── ForwardingClientStreamListenerTest.java │ │ │ ├── ForwardingClientStreamTest.java │ │ │ ├── ForwardingClientStreamTracerTest.java │ │ │ ├── ForwardingManagedChannelTest.java │ │ │ ├── ForwardingNameResolverTest.java │ │ │ ├── ForwardingReadableBufferTest.java │ │ │ ├── GrpcUtilTest.java │ │ │ ├── GzipInflatingBufferTest.java │ │ │ ├── HedgingPolicyTest.java │ │ │ ├── Http2ClientStreamTransportStateTest.java │ │ │ ├── InUseStateAggregatorTest.java │ │ │ ├── InstantTimeProviderTest.java │ │ │ ├── InternalSubchannelTest.java │ │ │ ├── JndiResourceResolverTest.java │ │ │ ├── JsonParserTest.java │ │ │ ├── JsonUtilTest.java │ │ │ ├── KeepAliveEnforcerTest.java │ │ │ ├── KeepAliveManagerTest.java │ │ │ ├── ManagedChannelImplBuilderTest.java │ │ │ ├── ManagedChannelImplGetNameResolverTest.java │ │ │ ├── ManagedChannelImplIdlenessTest.java │ │ │ ├── ManagedChannelImplTest.java │ │ │ ├── ManagedChannelOrphanWrapperTest.java │ │ │ ├── ManagedChannelServiceConfigTest.java │ │ │ ├── ManagedClientTransportTest.java │ │ │ ├── MaxConnectionIdleManagerTest.java │ │ │ ├── MessageDeframerTest.java │ │ │ ├── MessageFramerTest.java │ │ │ ├── MetricRecorderImplTest.java │ │ │ ├── PickFirstLeafLoadBalancerTest.java │ │ │ ├── PickFirstLoadBalancerProviderTest.java │ │ │ ├── PickFirstLoadBalancerTest.java │ │ │ ├── ProxyDetectorImplTest.java │ │ │ ├── ReadableBuffersArrayTest.java │ │ │ ├── ReadableBuffersByteBufferTest.java │ │ │ ├── ReadableBuffersTest.java │ │ │ ├── ReflectionLongAdderCounterTest.java │ │ │ ├── ReschedulerTest.java │ │ │ ├── RetriableStreamTest.java │ │ │ ├── RetryPolicyTest.java │ │ │ ├── RetryingNameResolverTest.java │ │ │ ├── SerializeReentrantCallsDirectExecutorTest.java │ │ │ ├── SerializingExecutorTest.java │ │ │ ├── ServerCallImplTest.java │ │ │ ├── ServerImplBuilderTest.java │ │ │ ├── ServerImplTest.java │ │ │ ├── ServiceConfigErrorHandlingTest.java │ │ │ ├── ServiceConfigStateTest.java │ │ │ ├── ServiceConfigUtilTest.java │ │ │ ├── SharedResourceHolderTest.java │ │ │ ├── SpiffeUtilTest.java │ │ │ └── TransportFrameUtilTest.java │ └── resources │ │ └── io │ │ └── grpc │ │ └── internal │ │ ├── spiffebundle.json │ │ ├── spiffebundle_corrupted_cert.json │ │ ├── spiffebundle_duplicates.json │ │ ├── spiffebundle_malformed.json │ │ ├── spiffebundle_wrong_kid.json │ │ ├── spiffebundle_wrong_kty.json │ │ ├── spiffebundle_wrong_multi_certs.json │ │ ├── spiffebundle_wrong_root.json │ │ ├── spiffebundle_wrong_seq_type.json │ │ ├── spiffebundle_wrong_use.json │ │ ├── test_hedging_service_config.json │ │ ├── test_retry_service_config.json │ │ └── uncompressable.bin │ └── testFixtures │ └── java │ └── io │ └── grpc │ └── internal │ ├── AbstractClientTransportFactoryTest.java │ ├── AbstractTransportTest.java │ ├── FakeClock.java │ ├── NoopClientStreamListener.java │ ├── PickFirstLoadBalancerProviderAccessor.java │ ├── ReadableBufferTestBase.java │ ├── SingleMessageProducer.java │ ├── TestUtils.java │ ├── WritableBufferAllocatorTestBase.java │ └── WritableBufferTestBase.java ├── cronet ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── io │ │ └── grpc │ │ └── cronet │ │ ├── CronetChannelBuilder.java │ │ ├── CronetClientStream.java │ │ ├── CronetClientTransport.java │ │ ├── CronetWritableBuffer.java │ │ ├── CronetWritableBufferAllocator.java │ │ ├── InternalCronetCallOptions.java │ │ └── InternalCronetChannelBuilder.java │ └── test │ └── java │ └── io │ └── grpc │ └── cronet │ ├── CronetChannelBuilderTest.java │ ├── CronetClientStreamTest.java │ ├── CronetClientTransportTest.java │ └── CronetWritableBufferAllocatorTest.java ├── documentation ├── android-binderchannel-status-codes.md ├── android-channel-builder.md └── server-reflection-tutorial.md ├── examples ├── .bazelrc ├── BUILD.bazel ├── MODULE.bazel ├── README.md ├── WORKSPACE ├── WORKSPACE.bzlmod ├── android │ ├── README.md │ ├── clientcache │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── grpc │ │ │ │ │ │ └── clientcacheexample │ │ │ │ │ │ ├── ClientCacheExampleActivity.java │ │ │ │ │ │ └── SafeMethodCachingInterceptor.java │ │ │ │ ├── proto │ │ │ │ │ └── helloworld.proto │ │ │ │ └── res │ │ │ │ │ ├── layout │ │ │ │ │ └── activity_clientcacheexample.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── clientcacheexample │ │ │ │ └── SafeMethodCachingInterceptorTest.java │ │ ├── build.gradle │ │ └── settings.gradle │ ├── helloworld │ │ ├── .gitignore │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── grpc │ │ │ │ │ └── helloworldexample │ │ │ │ │ └── HelloworldActivity.java │ │ │ │ ├── proto │ │ │ │ └── helloworld.proto │ │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ └── activity_helloworld.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── build.gradle │ │ └── settings.gradle │ ├── routeguide │ │ ├── .gitignore │ │ ├── app │ │ │ ├── .gitignore │ │ │ ├── build.gradle │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── grpc │ │ │ │ │ └── routeguideexample │ │ │ │ │ ├── RouteGuideActivity.java │ │ │ │ │ └── RouteGuideUtil.java │ │ │ │ ├── proto │ │ │ │ └── route_guide.proto │ │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ └── activity_routeguide.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ └── settings.gradle │ └── strictmode │ │ ├── README.md │ │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── strictmodehelloworldexample │ │ │ │ └── StrictModeHelloworldActivity.java │ │ │ ├── proto │ │ │ └── helloworld.proto │ │ │ └── res │ │ │ ├── layout │ │ │ └── activity_strictmodehelloworld.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── strings.xml │ │ ├── build.gradle │ │ ├── demo.png │ │ └── settings.gradle ├── build.gradle ├── example-alts │ ├── BUILD.bazel │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── alts │ │ │ ├── HelloWorldAltsClient.java │ │ │ └── HelloWorldAltsServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-debug │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── debug │ │ │ ├── HelloWorldDebuggableClient.java │ │ │ ├── HostnameDebuggableServer.java │ │ │ └── HostnameGreeter.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-dualstack │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── dualstack │ │ │ ├── DualStackClient.java │ │ │ ├── DualStackServer.java │ │ │ ├── ExampleDualStackNameResolver.java │ │ │ └── ExampleDualStackNameResolverProvider.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-gauth │ ├── BUILD.bazel │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── grpc │ │ └── examples │ │ └── googleAuth │ │ └── GoogleAuthClient.java ├── example-gcp-csm-observability │ ├── README.md │ ├── build.gradle │ ├── csm-client.Dockerfile │ ├── csm-server.Dockerfile │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── csmobservability │ │ │ ├── CsmObservabilityClient.java │ │ │ └── CsmObservabilityServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-gcp-observability │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── gcpobservability │ │ │ ├── GcpObservabilityClient.java │ │ │ └── GcpObservabilityServer.java │ │ ├── proto │ │ └── helloworld │ │ │ └── helloworld.proto │ │ └── resources │ │ └── io │ │ └── grpc │ │ └── examples │ │ └── gcpobservability │ │ ├── gcp_observability_client_config.json │ │ └── gcp_observability_server_config.json ├── example-hostname │ ├── BUILD.bazel │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── examples │ │ │ │ └── hostname │ │ │ │ ├── HostnameGreeter.java │ │ │ │ └── HostnameServer.java │ │ └── proto │ │ │ └── helloworld │ │ │ └── helloworld.proto │ │ └── test │ │ └── java │ │ └── io │ │ └── grpc │ │ └── examples │ │ └── hostname │ │ └── HostnameGreeterTest.java ├── example-jwt-auth │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── examples │ │ │ │ └── jwtauth │ │ │ │ ├── AuthClient.java │ │ │ │ ├── AuthServer.java │ │ │ │ ├── Constant.java │ │ │ │ ├── JwtCredential.java │ │ │ │ └── JwtServerInterceptor.java │ │ └── proto │ │ │ └── helloworld.proto │ │ └── test │ │ └── java │ │ └── io │ │ └── grpc │ │ └── examples │ │ └── jwtauth │ │ └── AuthClientTest.java ├── example-oauth │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── examples │ │ │ │ └── oauth │ │ │ │ ├── AuthClient.java │ │ │ │ ├── AuthServer.java │ │ │ │ ├── Constant.java │ │ │ │ ├── ExampleOAuth2Credentials.java │ │ │ │ └── OAuth2ServerInterceptor.java │ │ └── proto │ │ │ └── helloworld.proto │ │ └── test │ │ └── java │ │ └── io │ │ └── grpc │ │ └── examples │ │ └── oauth │ │ └── AuthClientTest.java ├── example-opentelemetry │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── example │ │ │ └── opentelemetry │ │ │ ├── OpenTelemetryClient.java │ │ │ ├── OpenTelemetryServer.java │ │ │ └── logging │ │ │ ├── LoggingOpenTelemetryClient.java │ │ │ └── LoggingOpenTelemetryServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-orca │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── orca │ │ │ ├── CustomBackendMetricsClient.java │ │ │ ├── CustomBackendMetricsLoadBalancerProvider.java │ │ │ └── CustomBackendMetricsServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-reflection │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── reflection │ │ │ └── ReflectionServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-servlet │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── servlet │ │ │ └── examples │ │ │ └── helloworld │ │ │ └── HelloWorldServlet.java │ │ ├── proto │ │ └── helloworld │ │ │ └── helloworld.proto │ │ └── webapp │ │ └── WEB-INF │ │ ├── glassfish-web.xml │ │ └── jboss-web.xml ├── example-tls │ ├── BUILD.bazel │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── helloworldtls │ │ │ ├── HelloWorldClientTls.java │ │ │ └── HelloWorldServerTls.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── example-xds │ ├── README.md │ ├── build.gradle │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ └── helloworldxds │ │ │ ├── HostnameGreeter.java │ │ │ ├── XdsHelloWorldClient.java │ │ │ └── XdsHelloWorldServer.java │ │ └── proto │ │ └── helloworld │ │ └── helloworld.proto ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── logging.properties ├── pom.xml ├── settings.gradle └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── examples │ │ │ ├── advanced │ │ │ ├── HelloJsonClient.java │ │ │ ├── HelloJsonServer.java │ │ │ ├── JsonMarshaller.java │ │ │ └── README.md │ │ │ ├── cancellation │ │ │ ├── CancellationClient.java │ │ │ ├── CancellationServer.java │ │ │ └── README.md │ │ │ ├── customloadbalance │ │ │ ├── CustomLoadBalanceClient.java │ │ │ ├── README.md │ │ │ ├── ShufflingPickFirstLoadBalancer.java │ │ │ └── ShufflingPickFirstLoadBalancerProvider.java │ │ │ ├── deadline │ │ │ ├── DeadlineClient.java │ │ │ ├── DeadlineServer.java │ │ │ └── README.md │ │ │ ├── errordetails │ │ │ ├── ErrorDetailsExample.java │ │ │ └── README.md │ │ │ ├── errorhandling │ │ │ ├── DetailErrorSample.java │ │ │ ├── ErrorHandlingClient.java │ │ │ └── README.md │ │ │ ├── experimental │ │ │ ├── CompressingHelloWorldClient.java │ │ │ ├── CompressingHelloWorldServerAllMethods.java │ │ │ ├── CompressingHelloWorldServerPerMethod.java │ │ │ └── README.md │ │ │ ├── grpcproxy │ │ │ ├── GrpcProxy.java │ │ │ └── README.md │ │ │ ├── header │ │ │ ├── CustomHeaderClient.java │ │ │ ├── CustomHeaderServer.java │ │ │ ├── HeaderClientInterceptor.java │ │ │ ├── HeaderServerInterceptor.java │ │ │ └── README.md │ │ │ ├── healthservice │ │ │ ├── HealthServiceClient.java │ │ │ ├── HealthServiceServer.java │ │ │ └── README.md │ │ │ ├── hedging │ │ │ ├── HedgingHelloWorldClient.java │ │ │ ├── HedgingHelloWorldServer.java │ │ │ └── README.md │ │ │ ├── helloworld │ │ │ ├── HelloWorldClient.java │ │ │ ├── HelloWorldServer.java │ │ │ └── README.md │ │ │ ├── keepalive │ │ │ ├── KeepAliveClient.java │ │ │ ├── KeepAliveServer.java │ │ │ └── README.md │ │ │ ├── loadbalance │ │ │ ├── ExampleNameResolver.java │ │ │ ├── ExampleNameResolverProvider.java │ │ │ ├── LoadBalanceClient.java │ │ │ ├── LoadBalanceServer.java │ │ │ └── README.md │ │ │ ├── manualflowcontrol │ │ │ ├── BidiBlockingClient.java │ │ │ ├── ManualFlowControlClient.java │ │ │ ├── ManualFlowControlServer.java │ │ │ └── README.md │ │ │ ├── multiplex │ │ │ ├── EchoService.java │ │ │ ├── MultiplexingServer.java │ │ │ ├── README.md │ │ │ └── SharingClient.java │ │ │ ├── nameresolve │ │ │ ├── ExampleNameResolver.java │ │ │ ├── ExampleNameResolverProvider.java │ │ │ ├── NameResolveClient.java │ │ │ ├── NameResolveServer.java │ │ │ └── README.md │ │ │ ├── preserialized │ │ │ ├── ByteArrayMarshaller.java │ │ │ ├── PreSerializedClient.java │ │ │ ├── PreSerializedServer.java │ │ │ └── README.md │ │ │ ├── retrying │ │ │ ├── README.md │ │ │ ├── RetryingHelloWorldClient.java │ │ │ └── RetryingHelloWorldServer.java │ │ │ ├── routeguide │ │ │ ├── README.md │ │ │ ├── RouteGuideClient.java │ │ │ ├── RouteGuideServer.java │ │ │ └── RouteGuideUtil.java │ │ │ └── waitforready │ │ │ ├── README.md │ │ │ └── WaitForReadyClient.java │ ├── proto │ │ ├── grpc │ │ │ └── examples │ │ │ │ └── echo │ │ │ │ └── echo.proto │ │ ├── hello_streaming.proto │ │ ├── helloworld.proto │ │ └── route_guide.proto │ └── resources │ │ └── io │ │ └── grpc │ │ └── examples │ │ ├── hedging │ │ └── hedging_service_config.json │ │ ├── retrying │ │ └── retrying_service_config.json │ │ └── routeguide │ │ └── route_guide_db.json │ └── test │ └── java │ └── io │ └── grpc │ └── examples │ ├── header │ ├── HeaderClientInterceptorTest.java │ └── HeaderServerInterceptorTest.java │ ├── helloworld │ ├── HelloWorldClientTest.java │ └── HelloWorldServerTest.java │ └── routeguide │ ├── RouteGuideClientTest.java │ └── RouteGuideServerTest.java ├── gae-interop-testing ├── README.md └── gae-jdk8 │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── io │ │ └── grpc │ │ └── testing │ │ └── integration │ │ ├── LongLivedChannel.java │ │ └── NettyClientInteropServlet.java │ └── webapp │ └── WEB-INF │ ├── appengine-web.xml │ └── web.xml ├── gcp-csm-observability ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── gcp │ │ └── csm │ │ └── observability │ │ ├── CsmObservability.java │ │ └── MetadataExchanger.java │ └── test │ └── java │ └── io │ └── grpc │ └── gcp │ └── csm │ └── observability │ ├── CsmObservabilityTest.java │ └── MetadataExchangerTest.java ├── gcp-observability ├── build.gradle ├── interop │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── grpc │ │ └── gcp │ │ └── observability │ │ └── interop │ │ └── TestServiceInterop.java └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── gcp │ │ │ └── observability │ │ │ ├── GcpObservability.java │ │ │ ├── ObservabilityConfig.java │ │ │ ├── ObservabilityConfigImpl.java │ │ │ ├── interceptors │ │ │ ├── ConditionalClientInterceptor.java │ │ │ ├── ConfigFilterHelper.java │ │ │ ├── InetAddressUtil.java │ │ │ ├── InternalLoggingChannelInterceptor.java │ │ │ ├── InternalLoggingServerInterceptor.java │ │ │ └── LogHelper.java │ │ │ └── logging │ │ │ ├── GcpLogSink.java │ │ │ ├── Sink.java │ │ │ └── TraceLoggingHelper.java │ └── proto │ │ └── grpc │ │ └── observabilitylog │ │ └── v1 │ │ └── observabilitylog.proto │ └── test │ └── java │ └── io │ └── grpc │ └── gcp │ └── observability │ ├── GcpObservabilityTest.java │ ├── LoggingTest.java │ ├── MetricsTest.java │ ├── ObservabilityConfigImplTest.java │ ├── ObservabilityTestHelper.java │ ├── TracesTest.java │ ├── interceptors │ ├── ConditionalClientInterceptorTest.java │ ├── ConfigFilterHelperTest.java │ ├── InternalLoggingChannelInterceptorTest.java │ ├── InternalLoggingServerInterceptorTest.java │ └── LogHelperTest.java │ └── logging │ ├── GcpLogSinkTest.java │ └── TraceLoggingHelperTest.java ├── googleapis ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── googleapis │ │ │ ├── GoogleCloudToProdExperimentalNameResolverProvider.java │ │ │ ├── GoogleCloudToProdNameResolver.java │ │ │ └── GoogleCloudToProdNameResolverProvider.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── io.grpc.NameResolverProvider │ └── test │ └── java │ └── io │ └── grpc │ └── googleapis │ ├── GoogleCloudToProdNameResolverProviderTest.java │ └── GoogleCloudToProdNameResolverTest.java ├── gradle ├── javadoc │ ├── docs.oracle.com-javase-8-docs-api │ │ └── package-list │ ├── netty.io-4.1-api │ │ └── package-list │ ├── protobuf.dev-reference-java-api-docs │ │ └── package-list │ └── square.github.io-okhttp-2.x-okhttp │ │ └── package-list ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── grpclb ├── BUILD.bazel ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── lb │ │ └── v1 │ │ └── LoadBalancerGrpc.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── grpclb │ │ │ ├── BackendAddressGroup.java │ │ │ ├── CachedSubchannelPool.java │ │ │ ├── DropType.java │ │ │ ├── GrpclbClientLoadRecorder.java │ │ │ ├── GrpclbConfig.java │ │ │ ├── GrpclbConstants.java │ │ │ ├── GrpclbLoadBalancer.java │ │ │ ├── GrpclbLoadBalancerProvider.java │ │ │ ├── GrpclbNameResolver.java │ │ │ ├── GrpclbState.java │ │ │ ├── InternalGrpclbConstantsAccessor.java │ │ │ ├── SecretGrpclbNameResolverProvider.java │ │ │ ├── SubchannelPool.java │ │ │ └── TokenAttachingTracerFactory.java │ ├── proto │ │ └── grpc │ │ │ └── lb │ │ │ └── v1 │ │ │ └── load_balancer.proto │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── io.grpc.LoadBalancerProvider │ │ └── io.grpc.NameResolverProvider │ └── test │ └── java │ └── io │ └── grpc │ └── grpclb │ ├── CachedSubchannelPoolTest.java │ ├── FakeSocketAddress.java │ ├── GrpclbLoadBalancerProviderTest.java │ ├── GrpclbLoadBalancerTest.java │ ├── GrpclbNameResolverTest.java │ ├── SecretGrpclbNameResolverProviderTest.java │ └── TokenAttachingTracerFactoryTest.java ├── inprocess ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── inprocess │ │ ├── AnonymousInProcessSocketAddress.java │ │ ├── InProcessChannelBuilder.java │ │ ├── InProcessServer.java │ │ ├── InProcessServerBuilder.java │ │ ├── InProcessSocketAddress.java │ │ ├── InProcessTransport.java │ │ ├── InternalInProcessChannelBuilder.java │ │ ├── InternalInProcessServerBuilder.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── grpc │ └── inprocess │ ├── AnonymousInProcessSocketAddressTest.java │ ├── AnonymousInProcessTransportTest.java │ ├── InProcessChannelBuilderTest.java │ ├── InProcessClientTransportFactoryTest.java │ ├── InProcessServerBuilderTest.java │ ├── InProcessServerTest.java │ ├── InProcessSocketAddressTest.java │ └── InProcessTransportTest.java ├── interop-testing ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── testing │ │ └── integration │ │ ├── LoadBalancerStatsServiceGrpc.java │ │ ├── MetricsServiceGrpc.java │ │ ├── ReconnectServiceGrpc.java │ │ ├── TestServiceGrpc.java │ │ ├── UnimplementedServiceGrpc.java │ │ ├── XdsUpdateClientConfigureServiceGrpc.java │ │ └── XdsUpdateHealthServiceGrpc.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── testing │ │ │ └── integration │ │ │ ├── AbstractInteropTest.java │ │ │ ├── AltsHandshakerTestService.java │ │ │ ├── CustomBackendMetricsLoadBalancerProvider.java │ │ │ ├── GrpclbFallbackTestClient.java │ │ │ ├── GrpclbLongLivedAffinityTestClient.java │ │ │ ├── Http2Client.java │ │ │ ├── Http2TestCases.java │ │ │ ├── ReconnectTestClient.java │ │ │ ├── RpcBehaviorLoadBalancerProvider.java │ │ │ ├── SoakClient.java │ │ │ ├── StressTestClient.java │ │ │ ├── TestCases.java │ │ │ ├── TestServiceClient.java │ │ │ ├── TestServiceImpl.java │ │ │ ├── TestServiceServer.java │ │ │ ├── Util.java │ │ │ ├── XdsFederationTestClient.java │ │ │ ├── XdsTestClient.java │ │ │ └── XdsTestServer.java │ ├── proto │ │ └── grpc │ │ │ └── testing │ │ │ ├── empty.proto │ │ │ ├── messages.proto │ │ │ ├── metrics.proto │ │ │ └── test.proto │ └── resources │ │ └── META-INF │ │ └── services │ │ └── io.grpc.LoadBalancerProvider │ └── test │ └── java │ └── io │ └── grpc │ ├── ChannelAndServerBuilderTest.java │ ├── stub │ └── StubConfigTest.java │ └── testing │ └── integration │ ├── AltsHandshakerTest.java │ ├── AutoWindowSizingOnTest.java │ ├── CascadingTest.java │ ├── CompressionTest.java │ ├── ConcurrencyTest.java │ ├── Http2NettyLocalChannelTest.java │ ├── Http2NettyTest.java │ ├── Http2Test.java │ ├── InProcessTest.java │ ├── ManagedChannelBuilderSpiTest.java │ ├── ManagedChannelImplIntegrationTest.java │ ├── MoreInProcessTest.java │ ├── NettyFlowControlTest.java │ ├── OpenTelemetryContextPropagationTest.java │ ├── ProxyTest.java │ ├── RetryTest.java │ ├── RpcBehaviorLoadBalancerProviderTest.java │ ├── StressTestClientTest.java │ ├── TestCasesTest.java │ ├── TestServiceClientTest.java │ ├── TrafficControlProxy.java │ ├── TransportCompressionTest.java │ └── XdsTestServerTest.java ├── istio-interop-testing ├── build.gradle ├── src │ ├── generated │ │ └── main │ │ │ └── grpc │ │ │ └── io │ │ │ └── istio │ │ │ └── test │ │ │ └── EchoTestServiceGrpc.java │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── grpc │ │ │ └── testing │ │ │ └── istio │ │ │ └── EchoTestServer.java │ └── test │ │ └── java │ │ └── io │ │ └── grpc │ │ └── testing │ │ └── istio │ │ └── EchoTestServerTest.java └── third_party │ └── istio │ ├── LICENSE │ ├── import.sh │ └── src │ └── main │ └── proto │ └── test │ └── echo │ └── proto │ └── echo.proto ├── java_grpc_library.bzl ├── netty ├── BUILD.bazel ├── build.gradle ├── shaded │ ├── BUILD.bazel │ ├── build.gradle │ └── src │ │ └── testShadow │ │ └── java │ │ └── io │ │ └── grpc │ │ └── netty │ │ └── shaded │ │ └── ShadingTest.java └── src │ ├── jmh │ └── java │ │ └── io │ │ └── grpc │ │ └── netty │ │ ├── InboundHeadersBenchmark.java │ │ ├── MethodDescriptorBenchmark.java │ │ └── OutboundHeadersBenchmark.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── netty │ │ │ ├── AbstractHttp2Headers.java │ │ │ ├── AbstractNettyHandler.java │ │ │ ├── CancelClientStreamCommand.java │ │ │ ├── CancelServerStreamCommand.java │ │ │ ├── ClientTransportLifecycleManager.java │ │ │ ├── CreateStreamCommand.java │ │ │ ├── FixedKeyManagerFactory.java │ │ │ ├── FixedTrustManagerFactory.java │ │ │ ├── ForcefulCloseCommand.java │ │ │ ├── GracefulCloseCommand.java │ │ │ ├── GracefulServerCloseCommand.java │ │ │ ├── GrpcHttp2ConnectionHandler.java │ │ │ ├── GrpcHttp2HeadersUtils.java │ │ │ ├── GrpcHttp2OutboundHeaders.java │ │ │ ├── GrpcSslContexts.java │ │ │ ├── Http2ControlFrameLimitEncoder.java │ │ │ ├── InsecureFromHttp1ChannelCredentials.java │ │ │ ├── InternalGracefulServerCloseCommand.java │ │ │ ├── InternalNettyChannelBuilder.java │ │ │ ├── InternalNettyChannelCredentials.java │ │ │ ├── InternalNettyServerBuilder.java │ │ │ ├── InternalNettyServerCredentials.java │ │ │ ├── InternalNettySocketSupport.java │ │ │ ├── InternalProtocolNegotiationEvent.java │ │ │ ├── InternalProtocolNegotiator.java │ │ │ ├── InternalProtocolNegotiators.java │ │ │ ├── InternalWriteBufferingAndExceptionHandlerUtils.java │ │ │ ├── JettyTlsUtil.java │ │ │ ├── NegotiationType.java │ │ │ ├── NettyAdaptiveCumulator.java │ │ │ ├── NettyChannelBuilder.java │ │ │ ├── NettyChannelCredentials.java │ │ │ ├── NettyChannelProvider.java │ │ │ ├── NettyClientHandler.java │ │ │ ├── NettyClientStream.java │ │ │ ├── NettyClientTransport.java │ │ │ ├── NettyReadableBuffer.java │ │ │ ├── NettyServer.java │ │ │ ├── NettyServerBuilder.java │ │ │ ├── NettyServerCredentials.java │ │ │ ├── NettyServerHandler.java │ │ │ ├── NettyServerProvider.java │ │ │ ├── NettyServerStream.java │ │ │ ├── NettyServerTransport.java │ │ │ ├── NettySocketSupport.java │ │ │ ├── NettySslContextChannelCredentials.java │ │ │ ├── NettySslContextServerCredentials.java │ │ │ ├── NettyWritableBuffer.java │ │ │ ├── NettyWritableBufferAllocator.java │ │ │ ├── NoopSslEngine.java │ │ │ ├── ProtocolNegotiationEvent.java │ │ │ ├── ProtocolNegotiator.java │ │ │ ├── ProtocolNegotiators.java │ │ │ ├── SendGrpcFrameCommand.java │ │ │ ├── SendPingCommand.java │ │ │ ├── SendResponseHeadersCommand.java │ │ │ ├── StreamIdHolder.java │ │ │ ├── UdsNameResolver.java │ │ │ ├── UdsNameResolverProvider.java │ │ │ ├── UdsNettyChannelProvider.java │ │ │ ├── UnhelpfulSecurityProvider.java │ │ │ ├── Utils.java │ │ │ ├── WriteBufferingAndExceptionHandler.java │ │ │ ├── WriteQueue.java │ │ │ ├── X509AuthorityVerifier.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── io.grpc.ManagedChannelProvider │ │ ├── io.grpc.NameResolverProvider │ │ └── io.grpc.ServerProvider │ └── test │ └── java │ └── io │ └── grpc │ └── netty │ ├── AbstractHttp2HeadersTest.java │ ├── AdvancedTlsTest.java │ ├── GrpcHttp2HeadersUtilsTest.java │ ├── GrpcHttp2InboundHeadersTest.java │ ├── NettyAdaptiveCumulatorTest.java │ ├── NettyChannelBuilderTest.java │ ├── NettyChannelCredentialsTest.java │ ├── NettyChannelProviderTest.java │ ├── NettyClientHandlerTest.java │ ├── NettyClientStreamTest.java │ ├── NettyClientTransportFactoryTest.java │ ├── NettyClientTransportTest.java │ ├── NettyHandlerTestBase.java │ ├── NettyReadableBufferTest.java │ ├── NettyServerBuilderTest.java │ ├── NettyServerHandlerTest.java │ ├── NettyServerProviderTest.java │ ├── NettyServerStreamTest.java │ ├── NettyServerTest.java │ ├── NettyServerTransportTest.java │ ├── NettyStreamTestBase.java │ ├── NettyTestUtil.java │ ├── NettyTransportTest.java │ ├── NettyWritableBufferAllocatorTest.java │ ├── NettyWritableBufferTest.java │ ├── ProtocolNegotiatorsTest.java │ ├── TlsTest.java │ ├── UdsNameResolverProviderTest.java │ ├── UdsNameResolverTest.java │ ├── UdsNettyChannelProviderTest.java │ ├── UtilsTest.java │ ├── WriteBufferingAndExceptionHandlerTest.java │ └── WriteQueueTest.java ├── okhttp ├── BUILD.bazel ├── build.gradle ├── src │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── grpc │ │ │ │ └── okhttp │ │ │ │ ├── AsyncSink.java │ │ │ │ ├── ExceptionHandlingFrameWriter.java │ │ │ │ ├── ForwardingFrameWriter.java │ │ │ │ ├── HandshakerSocketFactory.java │ │ │ │ ├── Headers.java │ │ │ │ ├── InternalOkHttpChannelBuilder.java │ │ │ │ ├── InternalOkHttpServerBuilder.java │ │ │ │ ├── NegotiationType.java │ │ │ │ ├── NoopSslSocket.java │ │ │ │ ├── OkHttpChannelBuilder.java │ │ │ │ ├── OkHttpChannelProvider.java │ │ │ │ ├── OkHttpClientStream.java │ │ │ │ ├── OkHttpClientTransport.java │ │ │ │ ├── OkHttpFrameLogger.java │ │ │ │ ├── OkHttpProtocolNegotiator.java │ │ │ │ ├── OkHttpReadableBuffer.java │ │ │ │ ├── OkHttpServer.java │ │ │ │ ├── OkHttpServerBuilder.java │ │ │ │ ├── OkHttpServerProvider.java │ │ │ │ ├── OkHttpServerStream.java │ │ │ │ ├── OkHttpServerTransport.java │ │ │ │ ├── OkHttpSettingsUtil.java │ │ │ │ ├── OkHttpTlsUpgrader.java │ │ │ │ ├── OkHttpWritableBuffer.java │ │ │ │ ├── OkHttpWritableBufferAllocator.java │ │ │ │ ├── OutboundFlowController.java │ │ │ │ ├── PlaintextHandshakerSocketFactory.java │ │ │ │ ├── SslSocketFactoryChannelCredentials.java │ │ │ │ ├── SslSocketFactoryServerCredentials.java │ │ │ │ ├── TlsServerHandshakerSocketFactory.java │ │ │ │ ├── Utils.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ ├── io.grpc.ManagedChannelProvider │ │ │ └── io.grpc.ServerProvider │ └── test │ │ └── java │ │ └── io │ │ └── grpc │ │ └── okhttp │ │ ├── AsyncSinkTest.java │ │ ├── ExceptionHandlingFrameWriterTest.java │ │ ├── HeadersTest.java │ │ ├── OkHttpChannelBuilderTest.java │ │ ├── OkHttpChannelProviderTest.java │ │ ├── OkHttpClientStreamTest.java │ │ ├── OkHttpClientTransportFactoryTest.java │ │ ├── OkHttpClientTransportTest.java │ │ ├── OkHttpProtocolNegotiatorTest.java │ │ ├── OkHttpReadableBufferTest.java │ │ ├── OkHttpServerProviderTest.java │ │ ├── OkHttpServerTransportTest.java │ │ ├── OkHttpTlsUpgraderTest.java │ │ ├── OkHttpTransportTest.java │ │ ├── OkHttpWritableBufferAllocatorTest.java │ │ ├── OkHttpWritableBufferTest.java │ │ ├── OptionalMethodTest.java │ │ ├── SslSocketFactoryChannelCredentialsTest.java │ │ ├── TlsTest.java │ │ └── UtilsTest.java └── third_party │ └── okhttp │ ├── LICENSE │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── okhttp │ │ └── internal │ │ ├── CipherSuite.java │ │ ├── ConnectionSpec.java │ │ ├── Credentials.java │ │ ├── DistinguishedNameParser.java │ │ ├── Headers.java │ │ ├── OkHostnameVerifier.java │ │ ├── OptionalMethod.java │ │ ├── Platform.java │ │ ├── Protocol.java │ │ ├── StatusLine.java │ │ ├── TlsVersion.java │ │ ├── Util.java │ │ ├── framed │ │ ├── ErrorCode.java │ │ ├── FrameReader.java │ │ ├── FrameWriter.java │ │ ├── Header.java │ │ ├── HeadersMode.java │ │ ├── Hpack.java │ │ ├── Http2.java │ │ ├── Huffman.java │ │ ├── Settings.java │ │ └── Variant.java │ │ └── proxy │ │ ├── HttpUrl.java │ │ └── Request.java │ └── test │ └── java │ └── io │ └── grpc │ └── okhttp │ └── internal │ └── framed │ ├── HpackTest.java │ └── Http2Test.java ├── opentelemetry ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── opentelemetry │ │ ├── BinaryFormat.java │ │ ├── GrpcOpenTelemetry.java │ │ ├── GrpcTraceBinContextPropagator.java │ │ ├── InternalGrpcOpenTelemetry.java │ │ ├── InternalOpenTelemetryPlugin.java │ │ ├── MetadataGetter.java │ │ ├── MetadataSetter.java │ │ ├── OpenTelemetryMetricSink.java │ │ ├── OpenTelemetryMetricsModule.java │ │ ├── OpenTelemetryMetricsResource.java │ │ ├── OpenTelemetryPlugin.java │ │ ├── OpenTelemetryTracingModule.java │ │ └── internal │ │ └── OpenTelemetryConstants.java │ └── test │ └── java │ └── io │ └── grpc │ └── opentelemetry │ ├── GrpcOpenTelemetryTest.java │ ├── GrpcTraceBinContextPropagatorTest.java │ ├── MetadataGetterTest.java │ ├── MetadataSetterTest.java │ ├── OpenTelemetryMetricSinkTest.java │ ├── OpenTelemetryMetricsModuleTest.java │ └── OpenTelemetryTracingModuleTest.java ├── protobuf-lite ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── protobuf │ │ └── lite │ │ ├── ProtoInputStream.java │ │ ├── ProtoLiteUtils.java │ │ └── package-info.java │ └── test │ ├── java │ └── io │ │ └── grpc │ │ └── protobuf │ │ └── lite │ │ └── ProtoLiteUtilsTest.java │ └── proto │ └── simple_recursive.proto ├── protobuf ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── protobuf │ │ ├── ProtoFileDescriptorSupplier.java │ │ ├── ProtoMethodDescriptorSupplier.java │ │ ├── ProtoServiceDescriptorSupplier.java │ │ ├── ProtoUtils.java │ │ ├── StatusProto.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── grpc │ └── protobuf │ ├── ProtoUtilsTest.java │ └── StatusProtoTest.java ├── repositories.bzl ├── rls ├── BUILD.bazel ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── lookup │ │ └── v1 │ │ └── RouteLookupServiceGrpc.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── rls │ │ │ ├── AdaptiveThrottler.java │ │ │ ├── CachingRlsLbClient.java │ │ │ ├── ChildLbResolvedAddressFactory.java │ │ │ ├── ChildLoadBalancerHelper.java │ │ │ ├── LbPolicyConfiguration.java │ │ │ ├── LinkedHashLruCache.java │ │ │ ├── LruCache.java │ │ │ ├── ResolvedAddressFactory.java │ │ │ ├── RlsLoadBalancer.java │ │ │ ├── RlsLoadBalancerProvider.java │ │ │ ├── RlsProtoConverters.java │ │ │ ├── RlsProtoData.java │ │ │ ├── RlsRequestFactory.java │ │ │ ├── SubchannelStateManager.java │ │ │ ├── SubchannelStateManagerImpl.java │ │ │ └── Throttler.java │ ├── proto │ │ └── grpc │ │ │ └── lookup │ │ │ └── v1 │ │ │ ├── rls.proto │ │ │ └── rls_config.proto │ └── resources │ │ └── META-INF │ │ └── services │ │ └── io.grpc.LoadBalancerProvider │ └── test │ └── java │ └── io │ └── grpc │ └── rls │ ├── AdaptiveThrottlerTest.java │ ├── CachingRlsLbClientTest.java │ ├── ChildLbResolvedAddressFactoryTest.java │ ├── ChildLoadBalancerHelperTest.java │ ├── LbPolicyConfigurationTest.java │ ├── LinkedHashLruCacheTest.java │ ├── RlsLoadBalancerTest.java │ ├── RlsProtoConvertersTest.java │ ├── RlsRequestFactoryTest.java │ └── SubchannelStateManagerImplTest.java ├── run-test-client.sh ├── run-test-server.sh ├── s2a ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── s2a │ │ ├── S2AChannelCredentials.java │ │ └── internal │ │ ├── channel │ │ └── S2AHandshakerServiceChannel.java │ │ └── handshaker │ │ ├── ConnectionClosedException.java │ │ ├── GetAuthenticationMechanisms.java │ │ ├── ProtoUtil.java │ │ ├── S2AConnectionException.java │ │ ├── S2AIdentity.java │ │ ├── S2APrivateKeyMethod.java │ │ ├── S2AProtocolNegotiatorFactory.java │ │ ├── S2AStub.java │ │ ├── S2ATrustManager.java │ │ ├── SslContextFactory.java │ │ └── tokenmanager │ │ ├── AccessTokenManager.java │ │ ├── SingleTokenFetcher.java │ │ └── TokenFetcher.java │ └── test │ ├── java │ └── io │ │ └── grpc │ │ └── s2a │ │ ├── IntegrationTest.java │ │ ├── S2AChannelCredentialsTest.java │ │ └── internal │ │ ├── channel │ │ └── S2AHandshakerServiceChannelTest.java │ │ └── handshaker │ │ ├── FakeS2AServer.java │ │ ├── FakeS2AServerTest.java │ │ ├── FakeWriter.java │ │ ├── GetAuthenticationMechanismsTest.java │ │ ├── ProtoUtilTest.java │ │ ├── S2APrivateKeyMethodTest.java │ │ ├── S2AProtocolNegotiatorFactoryTest.java │ │ ├── S2AStubTest.java │ │ ├── S2ATrustManagerTest.java │ │ ├── SslContextFactoryTest.java │ │ └── tokenmanager │ │ └── SingleTokenAccessTokenManagerTest.java │ └── resources │ ├── README.md │ ├── cert_chain_ec.pem │ ├── client_cert.pem │ ├── client_key.pem │ ├── config.cnf │ ├── int_cert1_.cnf │ ├── int_cert1_ec.pem │ ├── int_cert2.cnf │ ├── int_cert2_ec.pem │ ├── int_key1_ec.pem │ ├── int_key2_ec.pem │ ├── leaf.cnf │ ├── leaf_cert_ec.pem │ ├── leaf_key_ec.pem │ ├── root_cert.pem │ ├── root_cert_ec.pem │ ├── root_ec.cnf │ ├── root_key.pem │ ├── root_key_ec.pem │ ├── server_cert.pem │ └── server_key.pem ├── services ├── BUILD.bazel ├── build.gradle └── src │ ├── generated │ ├── main │ │ └── grpc │ │ │ └── io │ │ │ └── grpc │ │ │ ├── channelz │ │ │ └── v1 │ │ │ │ └── ChannelzGrpc.java │ │ │ ├── health │ │ │ └── v1 │ │ │ │ └── HealthGrpc.java │ │ │ └── reflection │ │ │ ├── v1 │ │ │ └── ServerReflectionGrpc.java │ │ │ └── v1alpha │ │ │ └── ServerReflectionGrpc.java │ └── test │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── reflection │ │ └── testing │ │ ├── AnotherDynamicServiceGrpc.java │ │ ├── AnotherReflectableServiceGrpc.java │ │ ├── DynamicServiceGrpc.java │ │ └── ReflectableServiceGrpc.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ ├── protobuf │ │ │ └── services │ │ │ │ ├── BinaryLogProvider.java │ │ │ │ ├── BinaryLogProviderImpl.java │ │ │ │ ├── BinaryLogSink.java │ │ │ │ ├── BinaryLogs.java │ │ │ │ ├── BinlogHelper.java │ │ │ │ ├── ChannelzProtoUtil.java │ │ │ │ ├── ChannelzService.java │ │ │ │ ├── HealthCheckingLoadBalancerFactory.java │ │ │ │ ├── HealthCheckingLoadBalancerUtil.java │ │ │ │ ├── HealthServiceImpl.java │ │ │ │ ├── HealthStatusManager.java │ │ │ │ ├── InetAddressUtil.java │ │ │ │ ├── ProtoReflectionService.java │ │ │ │ ├── ProtoReflectionServiceV1.java │ │ │ │ ├── TempFileSink.java │ │ │ │ ├── internal │ │ │ │ └── HealthCheckingRoundRobinLoadBalancerProvider.java │ │ │ │ └── package-info.java │ │ │ └── services │ │ │ ├── AdminInterface.java │ │ │ ├── CallMetricRecorder.java │ │ │ ├── ChannelzService.java │ │ │ ├── HealthStatusManager.java │ │ │ ├── InternalCallMetricRecorder.java │ │ │ ├── InternalMetricRecorder.java │ │ │ ├── MetricRecorder.java │ │ │ ├── MetricRecorderHelper.java │ │ │ ├── MetricReport.java │ │ │ └── package-info.java │ ├── proto │ │ └── grpc │ │ │ ├── binlog │ │ │ └── v1 │ │ │ │ └── binarylog.proto │ │ │ ├── channelz │ │ │ └── v1 │ │ │ │ └── channelz.proto │ │ │ ├── health │ │ │ └── v1 │ │ │ │ └── health.proto │ │ │ └── reflection │ │ │ ├── v1 │ │ │ └── reflection.proto │ │ │ └── v1alpha │ │ │ └── reflection.proto │ └── resources │ │ └── META-INF │ │ └── services │ │ └── io.grpc.LoadBalancerProvider │ └── test │ ├── java │ └── io │ │ └── grpc │ │ ├── protobuf │ │ └── services │ │ │ ├── BinaryLogProviderImplTest.java │ │ │ ├── BinaryLogProviderTest.java │ │ │ ├── BinlogHelperTest.java │ │ │ ├── ChannelzProtoUtilTest.java │ │ │ ├── ChannelzServiceTest.java │ │ │ ├── ChannelzTestHelper.java │ │ │ ├── HealthCheckingLoadBalancerFactoryTest.java │ │ │ ├── HealthStatusManagerTest.java │ │ │ ├── ProtoReflectionServiceTest.java │ │ │ ├── ProtoReflectionServiceV1Test.java │ │ │ ├── TempFileSinkTest.java │ │ │ └── internal │ │ │ └── HealthCheckingRoundRobinLoadBalancerProviderTest.java │ │ └── services │ │ ├── AdminInterfaceChannelzTest.java │ │ └── CallMetricRecorderTest.java │ └── proto │ └── io │ └── grpc │ └── reflection │ └── testing │ ├── dynamic_reflection_test.proto │ ├── dynamic_reflection_test_depth_two.proto │ ├── reflection_test.proto │ ├── reflection_test_depth_three.proto │ ├── reflection_test_depth_two.proto │ └── reflection_test_depth_two_alternate.proto ├── servlet ├── build.gradle ├── jakarta │ └── build.gradle └── src │ ├── jettyTest │ └── java │ │ └── io │ │ └── grpc │ │ └── servlet │ │ ├── GrpcServletSmokeTest.java │ │ ├── JettyInteropTest.java │ │ └── JettyTransportTest.java │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── servlet │ │ ├── AsyncServletOutputStreamWriter.java │ │ ├── GrpcServlet.java │ │ ├── ServletAdapter.java │ │ ├── ServletServerBuilder.java │ │ ├── ServletServerStream.java │ │ └── package-info.java │ ├── test │ └── java │ │ └── io │ │ └── grpc │ │ └── servlet │ │ └── ServletServerBuilderTest.java │ ├── threadingTest │ └── java │ │ └── io │ │ └── grpc │ │ └── servlet │ │ └── AsyncServletOutputStreamWriterConcurrencyTest.java │ ├── tomcatTest │ └── java │ │ └── io │ │ └── grpc │ │ └── servlet │ │ ├── TomcatInteropTest.java │ │ └── TomcatTransportTest.java │ └── undertowTest │ └── java │ └── io │ └── grpc │ └── servlet │ ├── UndertowInteropTest.java │ └── UndertowTransportTest.java ├── settings.gradle ├── stub ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ └── java │ │ └── io │ │ └── grpc │ │ └── stub │ │ ├── AbstractAsyncStub.java │ │ ├── AbstractBlockingStub.java │ │ ├── AbstractFutureStub.java │ │ ├── AbstractStub.java │ │ ├── BlockingClientCall.java │ │ ├── CallStreamObserver.java │ │ ├── ClientCallStreamObserver.java │ │ ├── ClientCalls.java │ │ ├── ClientResponseObserver.java │ │ ├── InternalClientCalls.java │ │ ├── MetadataUtils.java │ │ ├── ServerCallStreamObserver.java │ │ ├── ServerCalls.java │ │ ├── StreamObserver.java │ │ ├── StreamObservers.java │ │ ├── annotations │ │ ├── GrpcGenerated.java │ │ └── RpcMethod.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── grpc │ └── stub │ ├── AbstractAsyncStubTest.java │ ├── AbstractBlockingStubTest.java │ ├── AbstractFutureStubTest.java │ ├── AbstractStubTest.java │ ├── BaseAbstractStubTest.java │ ├── BlockingClientCallTest.java │ ├── ClientCallsTest.java │ ├── MetadataUtilsTest.java │ ├── ServerCallsTest.java │ └── StreamObserversTest.java ├── testing-proto ├── build.gradle └── src │ ├── generated │ └── main │ │ └── grpc │ │ └── io │ │ └── grpc │ │ └── testing │ │ └── protobuf │ │ └── SimpleServiceGrpc.java │ ├── main │ └── proto │ │ └── io │ │ └── grpc │ │ └── testing │ │ └── protobuf │ │ └── simpleservice.proto │ └── test │ └── java │ └── io │ └── grpc │ └── testing │ └── protobuf │ └── SimpleServiceTest.java ├── testing ├── BUILD.bazel ├── build.gradle └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ ├── internal │ │ │ └── testing │ │ │ │ ├── FakeNameResolverProvider.java │ │ │ │ ├── StatsTestUtils.java │ │ │ │ ├── StreamRecorder.java │ │ │ │ ├── TestClientStreamTracer.java │ │ │ │ ├── TestServerStreamTracer.java │ │ │ │ ├── TestStreamTracer.java │ │ │ │ └── TestUtils.java │ │ │ └── testing │ │ │ ├── GrpcCleanupRule.java │ │ │ ├── GrpcServerRule.java │ │ │ ├── StreamRecorder.java │ │ │ ├── TestMethodDescriptors.java │ │ │ ├── TestUtils.java │ │ │ ├── TlsTesting.java │ │ │ └── package-info.java │ └── resources │ │ └── certs │ │ ├── README │ │ ├── badclient.key │ │ ├── badclient.pem │ │ ├── badserver.key │ │ ├── badserver.pem │ │ ├── ca-openssl.cnf │ │ ├── ca.key │ │ ├── ca.pem │ │ ├── client.key │ │ ├── client.pem │ │ ├── client_spiffe.pem │ │ ├── ecdsa.key │ │ ├── index.txt │ │ ├── openssl.cnf │ │ ├── server0.key │ │ ├── server0.pem │ │ ├── server1-openssl.cnf │ │ ├── server1.key │ │ ├── server1.pem │ │ ├── server1_spiffe.pem │ │ ├── spiffe-openssl.cnf │ │ ├── spiffe_cert.pem │ │ ├── spiffe_multi_uri_san_cert.pem │ │ ├── spiffebundle.json │ │ └── spiffebundle1.json │ └── test │ └── java │ └── io │ └── grpc │ └── testing │ ├── GrpcCleanupRuleTest.java │ ├── GrpcServerRuleTest.java │ └── TlsTestingTest.java ├── util ├── BUILD.bazel ├── build.gradle └── src │ ├── jmh │ └── java │ │ └── io │ │ └── grpc │ │ └── util │ │ └── HandlerRegistryBenchmark.java │ ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── util │ │ │ ├── AdvancedTlsX509KeyManager.java │ │ │ ├── AdvancedTlsX509TrustManager.java │ │ │ ├── CertificateUtils.java │ │ │ ├── ForwardingClientStreamTracer.java │ │ │ ├── ForwardingLoadBalancer.java │ │ │ ├── ForwardingLoadBalancerHelper.java │ │ │ ├── ForwardingSubchannel.java │ │ │ ├── GracefulSwitchLoadBalancer.java │ │ │ ├── HealthProducerHelper.java │ │ │ ├── MultiChildLoadBalancer.java │ │ │ ├── MutableHandlerRegistry.java │ │ │ ├── OutlierDetectionLoadBalancer.java │ │ │ ├── OutlierDetectionLoadBalancerProvider.java │ │ │ ├── RoundRobinLoadBalancer.java │ │ │ ├── SecretRoundRobinLoadBalancerProvider.java │ │ │ ├── TransmitStatusRuntimeExceptionInterceptor.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── io.grpc.LoadBalancerProvider │ ├── test │ └── java │ │ └── io │ │ └── grpc │ │ └── util │ │ ├── AdvancedTlsX509KeyManagerTest.java │ │ ├── AdvancedTlsX509TrustManagerTest.java │ │ ├── CertificateUtilsTest.java │ │ ├── ForwardingClientStreamTracerTest.java │ │ ├── ForwardingLoadBalancerHelperTest.java │ │ ├── ForwardingLoadBalancerTest.java │ │ ├── ForwardingSubchannelTest.java │ │ ├── GracefulSwitchLoadBalancerTest.java │ │ ├── HealthProducerHelperTest.java │ │ ├── MultiChildLoadBalancerTest.java │ │ ├── MutableHandlerRegistryTest.java │ │ ├── OutlierDetectionLoadBalancerProviderTest.java │ │ ├── OutlierDetectionLoadBalancerTest.java │ │ ├── RoundRobinLoadBalancerTest.java │ │ └── UtilServerInterceptorsTest.java │ └── testFixtures │ └── java │ └── io │ └── grpc │ └── util │ ├── AbstractTestHelper.java │ └── GracefulSwitchLoadBalancerAccessor.java └── xds ├── BUILD.bazel ├── build.gradle ├── src ├── generated │ └── thirdparty │ │ └── grpc │ │ ├── com │ │ └── github │ │ │ └── xds │ │ │ └── service │ │ │ └── orca │ │ │ └── v3 │ │ │ └── OpenRcaServiceGrpc.java │ │ └── io │ │ └── envoyproxy │ │ └── envoy │ │ └── service │ │ ├── discovery │ │ └── v3 │ │ │ └── AggregatedDiscoveryServiceGrpc.java │ │ ├── load_stats │ │ └── v3 │ │ │ └── LoadReportingServiceGrpc.java │ │ ├── rate_limit_quota │ │ └── v3 │ │ │ └── RateLimitQuotaServiceGrpc.java │ │ └── status │ │ └── v3 │ │ └── ClientStatusDiscoveryServiceGrpc.java ├── main │ ├── java │ │ └── io │ │ │ └── grpc │ │ │ └── xds │ │ │ ├── AddressFilter.java │ │ │ ├── CdsLoadBalancer2.java │ │ │ ├── CdsLoadBalancerProvider.java │ │ │ ├── ClusterImplLoadBalancer.java │ │ │ ├── ClusterImplLoadBalancerProvider.java │ │ │ ├── ClusterManagerLoadBalancer.java │ │ │ ├── ClusterManagerLoadBalancerProvider.java │ │ │ ├── ClusterResolverLoadBalancer.java │ │ │ ├── ClusterResolverLoadBalancerProvider.java │ │ │ ├── ClusterSpecifierPlugin.java │ │ │ ├── ClusterSpecifierPluginRegistry.java │ │ │ ├── ConfigOrError.java │ │ │ ├── CsdsService.java │ │ │ ├── Endpoints.java │ │ │ ├── EnvoyServerProtoData.java │ │ │ ├── FaultConfig.java │ │ │ ├── FaultFilter.java │ │ │ ├── Filter.java │ │ │ ├── FilterChainMatchingProtocolNegotiators.java │ │ │ ├── FilterChainSelectorManager.java │ │ │ ├── FilterRegistry.java │ │ │ ├── GcpAuthenticationFilter.java │ │ │ ├── GrpcBootstrapperImpl.java │ │ │ ├── GrpcXdsTransportFactory.java │ │ │ ├── HttpConnectionManager.java │ │ │ ├── InternalGrpcBootstrapperImpl.java │ │ │ ├── InternalRbacFilter.java │ │ │ ├── InternalSharedXdsClientPoolProvider.java │ │ │ ├── InternalXdsAttributes.java │ │ │ ├── LazyLoadBalancer.java │ │ │ ├── LeastRequestLoadBalancer.java │ │ │ ├── LeastRequestLoadBalancerProvider.java │ │ │ ├── LoadBalancerConfigFactory.java │ │ │ ├── MessagePrinter.java │ │ │ ├── MetadataRegistry.java │ │ │ ├── PriorityLoadBalancer.java │ │ │ ├── PriorityLoadBalancerProvider.java │ │ │ ├── RbacConfig.java │ │ │ ├── RbacFilter.java │ │ │ ├── RingHashLoadBalancer.java │ │ │ ├── RingHashLoadBalancerProvider.java │ │ │ ├── RingHashOptions.java │ │ │ ├── RouteLookupServiceClusterSpecifierPlugin.java │ │ │ ├── RouterFilter.java │ │ │ ├── RoutingUtils.java │ │ │ ├── SharedCallCounterMap.java │ │ │ ├── SharedXdsClientPoolProvider.java │ │ │ ├── StructOrError.java │ │ │ ├── ThreadSafeRandom.java │ │ │ ├── TlsContextManager.java │ │ │ ├── VirtualHost.java │ │ │ ├── WeightedRandomPicker.java │ │ │ ├── WeightedRoundRobinLoadBalancer.java │ │ │ ├── WeightedRoundRobinLoadBalancerProvider.java │ │ │ ├── WeightedTargetLoadBalancer.java │ │ │ ├── WeightedTargetLoadBalancerProvider.java │ │ │ ├── WrrLocalityLoadBalancer.java │ │ │ ├── WrrLocalityLoadBalancerProvider.java │ │ │ ├── XdsAttributes.java │ │ │ ├── XdsChannelCredentials.java │ │ │ ├── XdsClientMetricReporterImpl.java │ │ │ ├── XdsClientPoolFactory.java │ │ │ ├── XdsClusterResource.java │ │ │ ├── XdsConfig.java │ │ │ ├── XdsCredentialsProvider.java │ │ │ ├── XdsCredentialsRegistry.java │ │ │ ├── XdsDependencyManager.java │ │ │ ├── XdsEndpointResource.java │ │ │ ├── XdsLbPolicies.java │ │ │ ├── XdsListenerResource.java │ │ │ ├── XdsNameResolver.java │ │ │ ├── XdsNameResolverProvider.java │ │ │ ├── XdsRouteConfigureResource.java │ │ │ ├── XdsServerBuilder.java │ │ │ ├── XdsServerCredentials.java │ │ │ ├── XdsServerWrapper.java │ │ │ ├── client │ │ │ ├── Bootstrapper.java │ │ │ ├── BootstrapperImpl.java │ │ │ ├── ControlPlaneClient.java │ │ │ ├── EnvoyProtoData.java │ │ │ ├── LoadReportClient.java │ │ │ ├── LoadStatsManager2.java │ │ │ ├── Locality.java │ │ │ ├── MessagePrettyPrinter.java │ │ │ ├── ReferenceCounted.java │ │ │ ├── Stats.java │ │ │ ├── XdsClient.java │ │ │ ├── XdsClientImpl.java │ │ │ ├── XdsClientMetricReporter.java │ │ │ ├── XdsInitializationException.java │ │ │ ├── XdsLogger.java │ │ │ ├── XdsResourceType.java │ │ │ └── XdsTransportFactory.java │ │ │ ├── internal │ │ │ ├── GoogleDefaultXdsCredentialsProvider.java │ │ │ ├── InsecureXdsCredentialsProvider.java │ │ │ ├── MatcherParser.java │ │ │ ├── Matchers.java │ │ │ ├── ProtobufJsonConverter.java │ │ │ ├── TlsXdsCredentialsProvider.java │ │ │ ├── package-info.java │ │ │ ├── rbac │ │ │ │ └── engine │ │ │ │ │ └── GrpcAuthorizationEngine.java │ │ │ └── security │ │ │ │ ├── ClientSslContextProviderFactory.java │ │ │ │ ├── Closeable.java │ │ │ │ ├── CommonTlsContextUtil.java │ │ │ │ ├── DynamicSslContextProvider.java │ │ │ │ ├── ReferenceCountingMap.java │ │ │ │ ├── SecurityProtocolNegotiators.java │ │ │ │ ├── ServerSslContextProviderFactory.java │ │ │ │ ├── SslContextProvider.java │ │ │ │ ├── SslContextProviderSupplier.java │ │ │ │ ├── TlsContextManagerImpl.java │ │ │ │ ├── certprovider │ │ │ │ ├── CertProviderClientSslContextProvider.java │ │ │ │ ├── CertProviderClientSslContextProviderFactory.java │ │ │ │ ├── CertProviderServerSslContextProvider.java │ │ │ │ ├── CertProviderServerSslContextProviderFactory.java │ │ │ │ ├── CertProviderSslContextProvider.java │ │ │ │ ├── CertificateProvider.java │ │ │ │ ├── CertificateProviderProvider.java │ │ │ │ ├── CertificateProviderRegistry.java │ │ │ │ ├── CertificateProviderStore.java │ │ │ │ ├── FileWatcherCertificateProvider.java │ │ │ │ └── FileWatcherCertificateProviderProvider.java │ │ │ │ └── trust │ │ │ │ ├── CertificateUtils.java │ │ │ │ ├── XdsTrustManagerFactory.java │ │ │ │ └── XdsX509TrustManager.java │ │ │ ├── orca │ │ │ ├── OrcaMetricReportingServerInterceptor.java │ │ │ ├── OrcaOobUtil.java │ │ │ ├── OrcaPerRequestUtil.java │ │ │ └── OrcaServiceImpl.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── services │ │ ├── io.grpc.LoadBalancerProvider │ │ ├── io.grpc.NameResolverProvider │ │ └── io.grpc.xds.XdsCredentialsProvider └── test │ └── java │ └── io │ └── grpc │ └── xds │ ├── AddressFilterTest.java │ ├── CdsLoadBalancer2Test.java │ ├── CdsLoadBalancerProviderTest.java │ ├── ClusterImplLoadBalancerProviderTest.java │ ├── ClusterImplLoadBalancerTest.java │ ├── ClusterManagerLoadBalancerProviderTest.java │ ├── ClusterManagerLoadBalancerTest.java │ ├── ClusterResolverLoadBalancerProviderTest.java │ ├── ClusterResolverLoadBalancerTest.java │ ├── ClusterSpecifierPluginRegistryTest.java │ ├── ControlPlaneRule.java │ ├── CsdsServiceTest.java │ ├── DataPlaneRule.java │ ├── FakeControlPlaneXdsIntegrationTest.java │ ├── FaultFilterTest.java │ ├── FilterChainMatchingProtocolNegotiatorsTest.java │ ├── FilterChainSelectorManagerTest.java │ ├── GcpAuthenticationFilterTest.java │ ├── GrpcBootstrapperImplTest.java │ ├── GrpcXdsClientImplDataTest.java │ ├── GrpcXdsClientImplTestBase.java │ ├── GrpcXdsClientImplV3Test.java │ ├── GrpcXdsTransportFactoryTest.java │ ├── LeastRequestLoadBalancerProviderTest.java │ ├── LeastRequestLoadBalancerTest.java │ ├── LoadBalancerConfigFactoryTest.java │ ├── LoadReportClientTest.java │ ├── MessagePrinterTest.java │ ├── MetadataLoadBalancerProvider.java │ ├── PriorityLoadBalancerProviderTest.java │ ├── PriorityLoadBalancerTest.java │ ├── RbacFilterTest.java │ ├── RingHashLoadBalancerProviderTest.java │ ├── RingHashLoadBalancerTest.java │ ├── RouteLookupServiceClusterSpecifierPluginTest.java │ ├── RouterFilterTest.java │ ├── RoutingUtilsTest.java │ ├── SharedCallCounterMapTest.java │ ├── SharedXdsClientPoolProviderTest.java │ ├── StatefulFilter.java │ ├── WeightedRandomPickerTest.java │ ├── WeightedRoundRobinLoadBalancerProviderTest.java │ ├── WeightedRoundRobinLoadBalancerTest.java │ ├── WeightedTargetLoadBalancerProviderTest.java │ ├── WeightedTargetLoadBalancerTest.java │ ├── WrrLocalityLoadBalancerProviderTest.java │ ├── WrrLocalityLoadBalancerTest.java │ ├── XdsClientFallbackTest.java │ ├── XdsClientFederationTest.java │ ├── XdsClientMetricReporterImplTest.java │ ├── XdsClientWrapperForServerSdsTestMisc.java │ ├── XdsCredentialsRegistryTest.java │ ├── XdsDependencyManagerTest.java │ ├── XdsNameResolverProviderTest.java │ ├── XdsNameResolverTest.java │ ├── XdsSecurityClientServerTest.java │ ├── XdsServerBuilderTest.java │ ├── XdsServerTestHelper.java │ ├── XdsServerWrapperTest.java │ ├── XdsTestControlPlaneService.java │ ├── XdsTestLoadReportingService.java │ ├── XdsTestUtils.java │ ├── client │ ├── CommonBootstrapperTestUtils.java │ ├── EnvoyProtoDataTest.java │ └── LoadStatsManager2Test.java │ ├── internal │ ├── GoogleDefaultXdsCredentialsProviderTest.java │ ├── InsecureXdsCredentialsProviderTest.java │ ├── MatcherTest.java │ ├── ProtobufJsonConverterTest.java │ ├── TlsXdsCredentialsProviderTest.java │ ├── rbac │ │ └── engine │ │ │ └── GrpcAuthorizationEngineTest.java │ └── security │ │ ├── ClientSslContextProviderFactoryTest.java │ │ ├── CommonTlsContextTestsUtil.java │ │ ├── ReferenceCountingMapTest.java │ │ ├── SecurityProtocolNegotiatorsTest.java │ │ ├── ServerSslContextProviderFactoryTest.java │ │ ├── SslContextProviderSupplierTest.java │ │ ├── TlsContextManagerTest.java │ │ ├── certprovider │ │ ├── CertProviderClientSslContextProviderTest.java │ │ ├── CertProviderServerSslContextProviderTest.java │ │ ├── CertificateProviderStoreTest.java │ │ ├── CommonCertProviderTestUtils.java │ │ ├── FileWatcherCertificateProviderProviderTest.java │ │ ├── FileWatcherCertificateProviderTest.java │ │ └── TestCertificateProvider.java │ │ └── trust │ │ ├── XdsTrustManagerFactoryTest.java │ │ └── XdsX509TrustManagerTest.java │ └── orca │ ├── OrcaMetricReportingServerInterceptorTest.java │ ├── OrcaOobUtilTest.java │ ├── OrcaPerRequestUtilTest.java │ └── OrcaServiceImplTest.java └── third_party ├── cel-spec ├── LICENSE ├── import.sh └── src │ └── main │ └── proto │ └── cel │ └── expr │ ├── checked.proto │ └── syntax.proto ├── envoy ├── LICENSE ├── NOTICE ├── import.sh └── src │ └── main │ └── proto │ └── envoy │ ├── admin │ └── v3 │ │ ├── config_dump.proto │ │ └── config_dump_shared.proto │ ├── annotations │ └── deprecation.proto │ ├── config │ ├── accesslog │ │ └── v3 │ │ │ └── accesslog.proto │ ├── bootstrap │ │ └── v3 │ │ │ └── bootstrap.proto │ ├── cluster │ │ └── v3 │ │ │ ├── circuit_breaker.proto │ │ │ ├── cluster.proto │ │ │ ├── filter.proto │ │ │ └── outlier_detection.proto │ ├── core │ │ └── v3 │ │ │ ├── address.proto │ │ │ ├── backoff.proto │ │ │ ├── base.proto │ │ │ ├── config_source.proto │ │ │ ├── event_service_config.proto │ │ │ ├── extension.proto │ │ │ ├── grpc_service.proto │ │ │ ├── health_check.proto │ │ │ ├── http_service.proto │ │ │ ├── http_uri.proto │ │ │ ├── protocol.proto │ │ │ ├── proxy_protocol.proto │ │ │ ├── resolver.proto │ │ │ ├── socket_cmsg_headers.proto │ │ │ ├── socket_option.proto │ │ │ ├── substitution_format_string.proto │ │ │ └── udp_socket_config.proto │ ├── endpoint │ │ └── v3 │ │ │ ├── endpoint.proto │ │ │ ├── endpoint_components.proto │ │ │ └── load_report.proto │ ├── listener │ │ └── v3 │ │ │ ├── api_listener.proto │ │ │ ├── listener.proto │ │ │ ├── listener_components.proto │ │ │ ├── quic_config.proto │ │ │ └── udp_listener_config.proto │ ├── metrics │ │ └── v3 │ │ │ └── stats.proto │ ├── overload │ │ └── v3 │ │ │ └── overload.proto │ ├── rbac │ │ └── v3 │ │ │ └── rbac.proto │ ├── route │ │ └── v3 │ │ │ ├── route.proto │ │ │ ├── route_components.proto │ │ │ └── scoped_route.proto │ └── trace │ │ └── v3 │ │ ├── datadog.proto │ │ ├── dynamic_ot.proto │ │ ├── http_tracer.proto │ │ ├── lightstep.proto │ │ ├── opentelemetry.proto │ │ ├── service.proto │ │ └── zipkin.proto │ ├── data │ └── accesslog │ │ └── v3 │ │ └── accesslog.proto │ ├── extensions │ ├── clusters │ │ └── aggregate │ │ │ └── v3 │ │ │ └── cluster.proto │ ├── filters │ │ ├── common │ │ │ └── fault │ │ │ │ └── v3 │ │ │ │ └── fault.proto │ │ ├── http │ │ │ ├── fault │ │ │ │ └── v3 │ │ │ │ │ └── fault.proto │ │ │ ├── gcp_authn │ │ │ │ └── v3 │ │ │ │ │ └── gcp_authn.proto │ │ │ ├── rate_limit_quota │ │ │ │ └── v3 │ │ │ │ │ └── rate_limit_quota.proto │ │ │ ├── rbac │ │ │ │ └── v3 │ │ │ │ │ └── rbac.proto │ │ │ └── router │ │ │ │ └── v3 │ │ │ │ └── router.proto │ │ └── network │ │ │ └── http_connection_manager │ │ │ └── v3 │ │ │ └── http_connection_manager.proto │ ├── load_balancing_policies │ │ ├── client_side_weighted_round_robin │ │ │ └── v3 │ │ │ │ └── client_side_weighted_round_robin.proto │ │ ├── common │ │ │ └── v3 │ │ │ │ └── common.proto │ │ ├── least_request │ │ │ └── v3 │ │ │ │ └── least_request.proto │ │ ├── pick_first │ │ │ └── v3 │ │ │ │ └── pick_first.proto │ │ ├── ring_hash │ │ │ └── v3 │ │ │ │ └── ring_hash.proto │ │ ├── round_robin │ │ │ └── v3 │ │ │ │ └── round_robin.proto │ │ └── wrr_locality │ │ │ └── v3 │ │ │ └── wrr_locality.proto │ └── transport_sockets │ │ ├── http_11_proxy │ │ └── v3 │ │ │ └── upstream_http_11_connect.proto │ │ └── tls │ │ └── v3 │ │ ├── cert.proto │ │ ├── common.proto │ │ ├── secret.proto │ │ └── tls.proto │ ├── service │ ├── discovery │ │ └── v3 │ │ │ ├── ads.proto │ │ │ └── discovery.proto │ ├── load_stats │ │ └── v3 │ │ │ └── lrs.proto │ ├── rate_limit_quota │ │ └── v3 │ │ │ └── rlqs.proto │ └── status │ │ └── v3 │ │ └── csds.proto │ └── type │ ├── http │ └── v3 │ │ └── path_transformation.proto │ ├── matcher │ └── v3 │ │ ├── filter_state.proto │ │ ├── http_inputs.proto │ │ ├── metadata.proto │ │ ├── node.proto │ │ ├── number.proto │ │ ├── path.proto │ │ ├── regex.proto │ │ ├── string.proto │ │ ├── struct.proto │ │ └── value.proto │ ├── metadata │ └── v3 │ │ └── metadata.proto │ ├── tracing │ └── v3 │ │ └── custom_tag.proto │ └── v3 │ ├── http.proto │ ├── http_status.proto │ ├── percent.proto │ ├── range.proto │ ├── ratelimit_strategy.proto │ ├── ratelimit_unit.proto │ ├── semantic_version.proto │ └── token_bucket.proto ├── googleapis ├── LICENSE ├── import.sh └── src │ └── main │ └── proto │ └── google │ └── api │ └── expr │ └── v1alpha1 │ ├── checked.proto │ └── syntax.proto ├── protoc-gen-validate ├── LICENSE ├── NOTICE ├── import.sh └── src │ └── main │ └── proto │ └── validate │ └── validate.proto ├── xds ├── LICENSE ├── import.sh └── src │ └── main │ └── proto │ ├── udpa │ ├── annotations │ │ ├── migrate.proto │ │ ├── security.proto │ │ ├── sensitive.proto │ │ ├── status.proto │ │ └── versioning.proto │ └── type │ │ └── v1 │ │ └── typed_struct.proto │ └── xds │ ├── annotations │ └── v3 │ │ ├── migrate.proto │ │ ├── security.proto │ │ ├── sensitive.proto │ │ ├── status.proto │ │ └── versioning.proto │ ├── core │ └── v3 │ │ ├── authority.proto │ │ ├── collection_entry.proto │ │ ├── context_params.proto │ │ ├── extension.proto │ │ ├── resource_locator.proto │ │ └── resource_name.proto │ ├── data │ └── orca │ │ └── v3 │ │ └── orca_load_report.proto │ ├── service │ └── orca │ │ └── v3 │ │ └── orca.proto │ └── type │ ├── matcher │ └── v3 │ │ ├── cel.proto │ │ ├── http_inputs.proto │ │ ├── matcher.proto │ │ ├── regex.proto │ │ └── string.proto │ └── v3 │ ├── cel.proto │ └── typed_struct.proto └── zero-allocation-hashing ├── LICENSE ├── NOTICE ├── main └── java │ └── io │ └── grpc │ └── xds │ └── XxHash64.java └── test └── java └── io └── grpc └── xds └── XxHash64Test.java /.bazelignore: -------------------------------------------------------------------------------- 1 | # examples has its own WORKSPACE. Ignore as part of this root WORKSPACE so that 2 | # we don't need to repeat dependencies. 3 | examples/ 4 | -------------------------------------------------------------------------------- /.bazelrc: -------------------------------------------------------------------------------- 1 | build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | TestService.java.txt -text 2 | TestServiceLite.java.txt -text 3 | TestDeprecatedService.java.txt -text 4 | TestDeprecatedServiceLite.java.txt -text 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ask_question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ask a question 3 | about: Asking a question related gRPC-Java 4 | labels: question 5 | --- 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Report a bug 3 | about: Create a bug report to help us improve 4 | --- 5 | 6 | 7 | 8 | ### What version of gRPC-Java are you using? 9 | 10 | ### What is your environment? 11 | 12 | 13 | ### What did you expect to see? 14 | 15 | ### What did you see instead? 16 | 17 | ### Steps to reproduce the bug 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request a feature 3 | about: Suggest an enhancement for gRPC 4 | labels: enhancement 5 | --- 6 | 7 | 8 | 9 | ### Is your feature request related to a problem? 10 | 11 | 12 | ### Describe the solution you'd like 13 | 14 | 15 | ### Describe alternatives you've considered 16 | 17 | 18 | ### Additional context 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/branch-testing.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Actions Branch Testing 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - 'v1.*' 8 | schedule: 9 | - cron: '54 19 * * SUN' # weekly at a "random" time 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | arm64: 16 | runs-on: ubuntu-24.04-arm 17 | strategy: 18 | matrix: 19 | jre: [17] 20 | fail-fast: false # Should swap to true if we grow a large matrix 21 | 22 | steps: 23 | - uses: actions/checkout@v4 24 | - uses: actions/setup-java@v4 25 | with: 26 | java-version: ${{ matrix.jre }} 27 | distribution: 'temurin' 28 | 29 | - name: Gradle cache 30 | uses: actions/cache@v4 31 | with: 32 | path: | 33 | ~/.gradle/caches 34 | ~/.gradle/wrapper 35 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} 36 | restore-keys: | 37 | ${{ runner.os }}-gradle- 38 | 39 | - name: Build 40 | run: ./gradlew -Dorg.gradle.parallel=true -Dorg.gradle.jvmargs='-Xmx1g' -PskipAndroid=true -PskipCodegen=true -PerrorProne=false test 41 | 42 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | validation: 9 | name: "Gradle wrapper validation" 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: gradle/actions/wrapper-validation@v4 14 | -------------------------------------------------------------------------------- /.github/workflows/lock.yml: -------------------------------------------------------------------------------- 1 | name: 'Lock Threads' 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '37 3 * * *' 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | 12 | jobs: 13 | lock: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: dessant/lock-threads@v5 17 | with: 18 | github-token: ${{ github.token }} 19 | issue-inactive-days: 90 20 | pr-inactive-days: 90 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | build 3 | gradle.properties 4 | .gradle 5 | local.properties 6 | out 7 | 8 | # Maven (examples) 9 | target 10 | 11 | # Bazel 12 | bazel-bin 13 | bazel-examples 14 | bazel-genfiles 15 | bazel-grpc-java 16 | bazel-out 17 | bazel-testlogs 18 | MODULE.bazel.lock 19 | 20 | # IntelliJ IDEA 21 | .idea 22 | *.iml 23 | *.ipr 24 | *.iws 25 | .ijwb 26 | 27 | # Eclipse 28 | .classpath 29 | .project 30 | .settings 31 | .gitignore 32 | bin 33 | 34 | # OS X 35 | .DS_Store 36 | 37 | # Emacs 38 | *~ 39 | \#*\# 40 | 41 | # ARM tests 42 | qemu-arm-static 43 | 44 | # Temporary output dir for artifacts 45 | mvn-artifacts 46 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /WORKSPACE.bzlmod: -------------------------------------------------------------------------------- 1 | # When using bzlmod this makes sure nothing from the legacy WORKSPACE is loaded 2 | -------------------------------------------------------------------------------- /alts/src/main/java/io/grpc/alts/internal/TsiHandshakerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The 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 | package io.grpc.alts.internal; 18 | 19 | import io.grpc.ChannelLogger; 20 | import javax.annotation.Nullable; 21 | 22 | /** Factory that manufactures instances of {@link TsiHandshaker}. */ 23 | public interface TsiHandshakerFactory { 24 | 25 | /** Creates a new handshaker. */ 26 | TsiHandshaker newHandshaker(@Nullable String authority, ChannelLogger logger); 27 | } 28 | -------------------------------------------------------------------------------- /alts/src/test/java/io/grpc/alts/AltsServerBuilderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The 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 | package io.grpc.alts; 18 | 19 | import org.junit.Test; 20 | import org.junit.runner.RunWith; 21 | import org.junit.runners.JUnit4; 22 | 23 | @RunWith(JUnit4.class) 24 | public final class AltsServerBuilderTest { 25 | 26 | @Test 27 | public void buildsNettyServer() throws Exception { 28 | AltsServerBuilder.forPort(1234).enableUntrustedAltsForTesting().build(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /alts/src/test/java/io/grpc/alts/ComputeEngineChannelBuilderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The 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 | package io.grpc.alts; 18 | 19 | import org.junit.Test; 20 | import org.junit.runner.RunWith; 21 | import org.junit.runners.JUnit4; 22 | 23 | @RunWith(JUnit4.class) 24 | public final class ComputeEngineChannelBuilderTest { 25 | 26 | @Test 27 | public void buildsNettyChannel() throws Exception { 28 | ComputeEngineChannelBuilder builder = ComputeEngineChannelBuilder.forTarget("localhost:8080"); 29 | builder.build(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /alts/src/test/java/io/grpc/alts/GoogleDefaultChannelBuilderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The 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 | package io.grpc.alts; 18 | 19 | import org.junit.Test; 20 | import org.junit.runner.RunWith; 21 | import org.junit.runners.JUnit4; 22 | 23 | @RunWith(JUnit4.class) 24 | public final class GoogleDefaultChannelBuilderTest { 25 | 26 | @Test 27 | public void buildsNettyChannel() throws Exception { 28 | GoogleDefaultChannelBuilder builder = GoogleDefaultChannelBuilder.forTarget("localhost:8080"); 29 | builder.build(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /android-interop-testing/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn android.test.** 13 | -dontwarn com.google.common.** 14 | -dontwarn javax.naming.** 15 | -dontwarn okio.** 16 | -dontwarn org.junit.** 17 | -dontwarn org.mockito.** 18 | -dontwarn sun.reflect.** 19 | # Ignores: can't find referenced class javax.lang.model.element.Modifier 20 | -dontwarn com.google.errorprone.annotations.** 21 | 22 | # Ignores: can't find referenced method from grpc-testing's compileOnly dependency on Truth 23 | -dontwarn io.grpc.testing.DeadlineSubject 24 | 25 | -keepclassmembers class io.grpc.testing.integration.Messages$* { 26 | *; 27 | } -------------------------------------------------------------------------------- /android-interop-testing/src/androidTest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/color/focus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/android-interop-testing/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/android-interop-testing/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/android-interop-testing/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/android-interop-testing/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-interop-testing/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | gRPC Integration Test 3 | 4 | -------------------------------------------------------------------------------- /android-interop-testing/start-emulator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # The only argument is the AVD name. 4 | # Note: This script will hang, you may want to run it in the background. 5 | 6 | if [ $# -eq 0 ] 7 | then 8 | echo "Please specify the AVD name" 9 | exit 1 10 | fi 11 | 12 | echo "[INFO] Starting emulator $1" 13 | emulator64-arm -avd $1 -netfast -no-skin -no-audio -no-window -port 5554 14 | -------------------------------------------------------------------------------- /android-interop-testing/wait-for-emulator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Waiting for emulator to start..." 3 | 4 | bootanim="" 5 | failcounter=0 6 | until [[ "$bootanim" =~ "stopped" ]]; do 7 | bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` 8 | let "failcounter += 1" 9 | # Timeout after 5 minutes. 10 | if [[ $failcounter -gt 300 ]]; then 11 | echo "Can not find device after 5 minutes..." 12 | exit 1 13 | fi 14 | sleep 1 15 | done 16 | 17 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /api/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "api", 5 | srcs = glob([ 6 | "src/main/java/**/*.java", 7 | "src/context/java/**/*.java", 8 | ]), 9 | visibility = ["//visibility:public"], 10 | deps = [ 11 | artifact("com.google.code.findbugs:jsr305"), 12 | artifact("com.google.errorprone:error_prone_annotations"), 13 | artifact("com.google.guava:failureaccess"), # future transitive dep of Guava. See #5214 14 | artifact("com.google.guava:guava"), 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/CallbackMetricInstrument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | /** 20 | * Tagging interface for MetricInstruments that can be used with batch callbacks. 21 | */ 22 | @Internal 23 | public interface CallbackMetricInstrument extends MetricInstrument {} 24 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InsecureChannelCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc; 18 | 19 | /** No client identity, authentication, or encryption is to be used. */ 20 | public final class InsecureChannelCredentials extends ChannelCredentials { 21 | public static ChannelCredentials create() { 22 | return new InsecureChannelCredentials(); 23 | } 24 | 25 | private InsecureChannelCredentials() {} 26 | 27 | @Override 28 | public ChannelCredentials withoutBearerTokens() { 29 | return this; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InsecureServerCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc; 18 | 19 | /** No server identity or encryption is to be used. */ 20 | public final class InsecureServerCredentials extends ServerCredentials { 21 | public static ServerCredentials create() { 22 | return new InsecureServerCredentials(); 23 | } 24 | 25 | private InsecureServerCredentials() {} 26 | } 27 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalCallOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The 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 | package io.grpc; 18 | 19 | /** 20 | * Internal accessor for {@link CallOptions}. 21 | */ 22 | @Internal 23 | public final class InternalCallOptions { 24 | private InternalCallOptions() {} 25 | 26 | /** 27 | * Gets the waitForReady bit or {@code null} if it was never set. 28 | */ 29 | public static Boolean getWaitForReady(CallOptions callOptions) { 30 | return callOptions.getWaitForReady(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalConfigurator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | /** 20 | * Internal access to Configurator API. 21 | */ 22 | @Internal 23 | public interface InternalConfigurator extends Configurator {} 24 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalDecompressorRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc; 18 | 19 | /** 20 | * Private accessor for decompressor registries. Don't use this. 21 | */ 22 | @Internal 23 | public final class InternalDecompressorRegistry { 24 | private InternalDecompressorRegistry() {} 25 | 26 | @Internal 27 | public static byte[] getRawAdvertisedMessageEncodings(DecompressorRegistry reg) { 28 | return reg.getRawAdvertisedMessageEncodings(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalKnownTransport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc; 18 | 19 | /** 20 | * All known transports. 21 | * 22 | *

Make sure to update MethodDescriptor.rawMethodNames if this is changed. 23 | */ 24 | @Internal 25 | public enum InternalKnownTransport { 26 | NETTY, 27 | NETTY_SHADED, 28 | ; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalMayRequireSpecificExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The 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 | package io.grpc; 18 | 19 | @Internal 20 | public interface InternalMayRequireSpecificExecutor { 21 | boolean isSpecificExecutorRequired(); 22 | } 23 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc; 18 | 19 | /** 20 | * Internal accessor for getting the {@link Server} instance inside server RPC {@link Context}. 21 | * This is intended for usage internal to the gRPC team. If you think you need to use 22 | * this, contact the gRPC team first. 23 | */ 24 | @Internal 25 | public class InternalServer { 26 | public static final Context.Key SERVER_CONTEXT_KEY = Server.SERVER_CONTEXT_KEY; 27 | 28 | // Prevent instantiation. 29 | private InternalServer() { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalSubchannelAddressAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | /** 20 | * An internal class. Do not use. 21 | * 22 | *

An interface to provide the attributes for address connected by subchannel. 23 | */ 24 | @Internal 25 | public interface InternalSubchannelAddressAttributes { 26 | 27 | /** 28 | * Return attributes of the server address connected by sub channel. 29 | */ 30 | public Attributes getConnectedAddressAttributes(); 31 | } 32 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/InternalTimeUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | import java.time.Duration; 20 | 21 | @Internal 22 | public final class InternalTimeUtils { 23 | public static long convert(Duration duration) { 24 | return TimeUtils.convertToNanos(duration); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/ProxiedSocketAddress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The 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 | package io.grpc; 18 | 19 | import java.net.SocketAddress; 20 | 21 | /** 22 | * An address that contains the information about making a connection via a proxy. It is created by 23 | * a {@link ProxyDetector}. 24 | */ 25 | public abstract class ProxiedSocketAddress extends SocketAddress { 26 | private static final long serialVersionUID = 0L; 27 | } 28 | -------------------------------------------------------------------------------- /api/src/main/java/io/grpc/TimeUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | import java.time.Duration; 20 | 21 | final class TimeUtils { 22 | private TimeUtils() {} 23 | 24 | @IgnoreJRERequirement 25 | static long convertToNanos(Duration duration) { 26 | try { 27 | return duration.toNanos(); 28 | } catch (ArithmeticException tooBig) { 29 | return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/src/test/java/io/grpc/ServiceProvidersTestAbstractProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The 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 | package io.grpc; 18 | 19 | /** 20 | * A provider class for the {@link ServiceProvidersTest}. 21 | */ 22 | // Nesting the class inside the test leads to a class name that has a '$' in it, which causes 23 | // issues with our build pipeline. 24 | abstract class ServiceProvidersTestAbstractProvider { 25 | abstract boolean isAvailable(); 26 | 27 | abstract int priority(); 28 | } 29 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-empty.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-empty.txt -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-failAtAvailableProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$FailAtAvailableProvider 2 | io.grpc.ServiceProvidersTest$Available5Provider 3 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-failAtInitProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$FailAtInitProvider 2 | io.grpc.ServiceProvidersTest$Available5Provider 3 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-failAtPriorityProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$FailAtPriorityProvider 2 | io.grpc.ServiceProvidersTest$Available5Provider 3 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-multipleProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$Available5Provider 2 | io.grpc.ServiceProvidersTest$Available7Provider 3 | io.grpc.ServiceProvidersTest$Available0Provider 4 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-unavailableProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$UnavailableProvider 2 | io.grpc.ServiceProvidersTest$Available7Provider 3 | -------------------------------------------------------------------------------- /api/src/test/resources/io/grpc/ServiceProvidersTestAbstractProvider-unknownClassProvider.txt: -------------------------------------------------------------------------------- 1 | io.grpc.ServiceProvidersTest$UnknownClassProvider 2 | -------------------------------------------------------------------------------- /api/src/testFixtures/java/io/grpc/ManagedChannelRegistryAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc; 18 | 19 | /** Accesses test-only methods of {@link ManagedChannelRegistry}. */ 20 | public final class ManagedChannelRegistryAccessor { 21 | private ManagedChannelRegistryAccessor() {} 22 | 23 | public static Iterable> getHardCodedClasses() { 24 | return ManagedChannelRegistry.getHardCodedClasses(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api/src/testFixtures/java/io/grpc/MetricInstrumentRegistryAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc; 18 | 19 | /** 20 | * Accesses test-only methods of {@link MetricInstrumentRegistry}. 21 | */ 22 | public final class MetricInstrumentRegistryAccessor { 23 | 24 | private MetricInstrumentRegistryAccessor() { 25 | } 26 | 27 | public static MetricInstrumentRegistry createMetricInstrumentRegistry() { 28 | return new MetricInstrumentRegistry(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/src/testFixtures/java/io/grpc/ServerRegistryAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 The 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 | package io.grpc; 18 | 19 | /** Accesses test-only methods of {@link ServerRegistry}. */ 20 | public final class ServerRegistryAccessor { 21 | private ServerRegistryAccessor() {} 22 | 23 | public static Iterable> getHardCodedClasses() { 24 | return ServerRegistry.getHardCodedClasses(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /auth/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "auth", 5 | srcs = glob([ 6 | "src/main/java/io/grpc/auth/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//api", 11 | artifact("com.google.auth:google-auth-library-credentials"), 12 | artifact("com.google.code.findbugs:jsr305"), 13 | artifact("com.google.guava:guava"), 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /auth/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java-library" 3 | id "maven-publish" 4 | 5 | id "me.champeau.gradle.japicmp" 6 | id "ru.vyarus.animalsniffer" 7 | } 8 | 9 | description = "gRPC: Auth" 10 | 11 | tasks.named("jar").configure { 12 | manifest { 13 | attributes('Automatic-Module-Name': 'io.grpc.auth') 14 | } 15 | } 16 | 17 | dependencies { 18 | api project(':grpc-api'), 19 | libraries.google.auth.credentials 20 | implementation libraries.guava 21 | testImplementation project(':grpc-testing'), 22 | project(':grpc-core'), 23 | project(":grpc-context"), // Override google-auth dependency with our newer version 24 | libraries.google.auth.oauth2Http 25 | signature (libraries.signature.java) { 26 | artifact { 27 | extension = "signature" 28 | } 29 | } 30 | signature (libraries.signature.android) { 31 | artifact { 32 | extension = "signature" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /auth/src/main/java/io/grpc/auth/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | * Implementations of {@link io.grpc.CallCredentials} and authentication related API. 19 | */ 20 | package io.grpc.auth; 21 | -------------------------------------------------------------------------------- /binder/src/androidTest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /binder/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /binder/src/test/java/io/grpc/binder/PeerUidTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023 The 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 | package io.grpc.binder; 18 | 19 | import com.google.common.testing.EqualsTester; 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | import org.junit.runners.JUnit4; 23 | 24 | @RunWith(JUnit4.class) 25 | public class PeerUidTest { 26 | 27 | @Test 28 | public void shouldImplementEqualsAndHashCode() { 29 | new EqualsTester() 30 | .addEqualityGroup(new PeerUid(123), new PeerUid(123)) 31 | .addEqualityGroup(new PeerUid(456)) 32 | .testEquals(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /buildSrc/build.gradle: -------------------------------------------------------------------------------- 1 | tasks.withType(JavaCompile).configureEach { 2 | it.options.compilerArgs += [ 3 | "-Xlint:all", 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /buildscripts/build_artifacts_in_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -exu -o pipefail 3 | 4 | # Runs all the tests and builds mvn artifacts. 5 | # mvn artifacts are stored in grpc-java/mvn-artifacts/ 6 | ALL_ARTIFACTS=true ARCH=x86_64 "$(dirname $0)"/kokoro/unix.sh 7 | # Already ran tests the first time, so skip tests this time 8 | SKIP_TESTS=true ARCH=x86_32 "$(dirname $0)"/kokoro/unix.sh 9 | -------------------------------------------------------------------------------- /buildscripts/build_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu -o pipefail 3 | 4 | readonly buildscripts_dir="$(dirname "$(readlink -f "$0")")" 5 | docker build -t grpc-java-artifacts-x86 "$buildscripts_dir"/grpc-java-artifacts 6 | docker build -t grpc-java-artifacts-multiarch -f "$buildscripts_dir"/grpc-java-artifacts/Dockerfile.multiarch.base "$buildscripts_dir"/grpc-java-artifacts 7 | docker build -t grpc-java-artifacts-ubuntu2004 -f "$buildscripts_dir"/grpc-java-artifacts/Dockerfile.ubuntu2004.base "$buildscripts_dir"/grpc-java-artifacts 8 | 9 | -------------------------------------------------------------------------------- /buildscripts/checkstyle.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | -------------------------------------------------------------------------------- /buildscripts/grpc-java-artifacts/Dockerfile.multiarch.base: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN export DEBIAN_FRONTEND=noninteractive && \ 4 | apt-get update && \ 5 | apt-get upgrade -y && \ 6 | apt-get install -y --no-install-recommends \ 7 | build-essential \ 8 | ca-certificates \ 9 | curl \ 10 | g++-aarch64-linux-gnu \ 11 | g++-powerpc64le-linux-gnu \ 12 | openjdk-8-jdk \ 13 | pkg-config \ 14 | && \ 15 | rm -rf /var/lib/apt/lists/* 16 | 17 | RUN curl -Ls https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.tar.gz | \ 18 | tar xz -C /var/local 19 | ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:$PATH 20 | 21 | -------------------------------------------------------------------------------- /buildscripts/grpc-java-artifacts/Dockerfile.ubuntu2004.base: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | RUN export DEBIAN_FRONTEND=noninteractive && \ 4 | apt-get update && \ 5 | apt-get upgrade -y && \ 6 | apt-get install -y --no-install-recommends \ 7 | build-essential \ 8 | ca-certificates \ 9 | curl \ 10 | g++-s390x-linux-gnu \ 11 | openjdk-8-jdk \ 12 | pkg-config \ 13 | && \ 14 | rm -rf /var/lib/apt/lists/* 15 | 16 | RUN curl -Ls https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.tar.gz | \ 17 | tar xz -C /var/local 18 | ENV PATH /var/local/cmake-3.26.3-linux-x86_64/bin:$PATH 19 | 20 | -------------------------------------------------------------------------------- /buildscripts/kokoro/android-interop.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/android-interop.sh" 5 | timeout_mins: 45 6 | -------------------------------------------------------------------------------- /buildscripts/kokoro/android.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/android.sh" 5 | timeout_mins: 45 6 | -------------------------------------------------------------------------------- /buildscripts/kokoro/gae-interop.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/gae-interop.sh" 5 | timeout_mins: 45 6 | -------------------------------------------------------------------------------- /buildscripts/kokoro/kokoro.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | spongify_logs() { 4 | local f 5 | while read -r f; do 6 | mkdir "${f%.xml}" 7 | cp "$f" "${f%.xml}/sponge_log.xml" 8 | done < <(find "${KOKORO_ARTIFACTS_DIR:-.}" -name 'TEST-*.xml') 9 | } 10 | -------------------------------------------------------------------------------- /buildscripts/kokoro/linux_artifacts.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/linux_artifacts.sh" 5 | timeout_mins: 60 6 | 7 | action { 8 | define_artifacts { 9 | regex: "github/grpc-java/**/build/test-results/**/sponge_log.xml" 10 | regex: "github/grpc-java/mvn-artifacts/**" 11 | regex: "github/grpc-java/artifacts/**" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildscripts/kokoro/linux_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -veux -o pipefail 3 | 4 | if [[ -f /VERSION ]]; then 5 | cat /VERSION 6 | fi 7 | 8 | readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)" 9 | 10 | . "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh 11 | trap spongify_logs EXIT 12 | 13 | "$GRPC_JAVA_DIR"/buildscripts/build_docker.sh 14 | "$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh grpc-java-artifacts-x86 /grpc-java/buildscripts/build_artifacts_in_docker.sh 15 | 16 | "$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh grpc-java-artifacts-multiarch env \ 17 | SKIP_TESTS=true ARCH=aarch_64 /grpc-java/buildscripts/kokoro/unix.sh 18 | "$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh grpc-java-artifacts-multiarch env \ 19 | SKIP_TESTS=true ARCH=ppcle_64 /grpc-java/buildscripts/kokoro/unix.sh 20 | # Use a newer GCC version. GCC 7 in multiarch has a bug: 21 | # internal compiler error: output_operand: invalid %-code 22 | "$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh grpc-java-artifacts-ubuntu2004 env \ 23 | SKIP_TESTS=true ARCH=s390_64 /grpc-java/buildscripts/kokoro/unix.sh 24 | -------------------------------------------------------------------------------- /buildscripts/kokoro/macos.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/macos.sh" 5 | timeout_mins: 45 6 | 7 | # We always build mvn artifacts. 8 | action { 9 | define_artifacts { 10 | regex: "github/grpc-java/**/build/test-results/**/sponge_log.xml" 11 | regex: "github/grpc-java/mvn-artifacts/**" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildscripts/kokoro/macos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -veux -o pipefail 3 | 4 | if [[ -f /VERSION ]]; then 5 | cat /VERSION 6 | fi 7 | 8 | readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)" 9 | 10 | # We had problems with random tests timing out because it took seconds to do 11 | # trivial (ns) operations. The Kokoro Mac machines have 2 cores with 4 logical 12 | # threads, so Gradle should be using 4 workers by default. 13 | export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2" 14 | 15 | . "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh 16 | trap spongify_logs EXIT 17 | 18 | export -n JAVA_HOME 19 | export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${PATH}" 20 | 21 | "$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh 22 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-cloud-run.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 240 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "cloud_run" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-csm.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 120 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "csm" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-dualstack.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 240 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "dualstack" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-interop-test-java.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eo pipefail 3 | 4 | # Input parameters to psm:: methods of the install script. 5 | readonly GRPC_LANGUAGE="java" 6 | readonly BUILD_SCRIPT_DIR="$(dirname "$0")" 7 | 8 | # Used locally. 9 | readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" 10 | 11 | psm::lang::source_install_lib() { 12 | echo "Sourcing test driver install script from: ${TEST_DRIVER_INSTALL_SCRIPT_URL}" 13 | local install_lib 14 | # Download to a tmp file. 15 | install_lib="$(mktemp -d)/psm_interop_kokoro_lib.sh" 16 | curl -s --retry-connrefused --retry 5 -o "${install_lib}" "${TEST_DRIVER_INSTALL_SCRIPT_URL}" 17 | # Checksum. 18 | if command -v sha256sum &> /dev/null; then 19 | echo "Install script checksum:" 20 | sha256sum "${install_lib}" 21 | fi 22 | source "${install_lib}" 23 | } 24 | 25 | psm::lang::source_install_lib 26 | source "${BUILD_SCRIPT_DIR}/psm-interop-build-${GRPC_LANGUAGE}.sh" 27 | psm::run "${PSM_TEST_SUITE}" 28 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-light.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 120 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "light" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/psm-security.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 240 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "security" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/release_artifacts.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/release_artifacts.sh" 5 | timeout_mins: 60 6 | -------------------------------------------------------------------------------- /buildscripts/kokoro/release_artifacts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -veux -o pipefail 3 | 4 | if [[ -f /VERSION ]]; then 5 | cat /VERSION 6 | fi 7 | 8 | readonly GRPC_JAVA_DIR=$(cd $(dirname $0)/../.. && pwd) 9 | 10 | # A place holder at the moment 11 | -------------------------------------------------------------------------------- /buildscripts/kokoro/upload_artifacts.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/upload_artifacts.sh" 5 | timeout_mins: 60 6 | -------------------------------------------------------------------------------- /buildscripts/kokoro/windows.bat: -------------------------------------------------------------------------------- 1 | @rem ########################################################################## 2 | @rem 3 | @rem Script to set up Kokoro worker and run Windows tests 4 | @rem 5 | @rem ########################################################################## 6 | 7 | type c:\VERSION 8 | 9 | @rem Enter repo root 10 | cd /d %~dp0\..\.. 11 | 12 | set WORKSPACE=T:\src\github\grpc-java 13 | set ESCWORKSPACE=%WORKSPACE:\=\\% 14 | @rem vswhere is too old, so it crashes gradle. https://github.com/gradle/gradle/issues/21993 15 | rename "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" vswhere-disabled.exe 16 | 17 | 18 | cmd.exe /C "%WORKSPACE%\buildscripts\kokoro\windows32.bat" || exit /b 1 19 | cmd.exe /C "%WORKSPACE%\buildscripts\kokoro\windows64.bat" || exit /b 1 20 | 21 | mkdir mvn-artifacts 22 | move artifacts\io mvn-artifacts 23 | -------------------------------------------------------------------------------- /buildscripts/kokoro/windows.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/windows.bat" 5 | timeout_mins: 90 6 | 7 | # We always build mvn artifacts. 8 | action { 9 | define_artifacts { 10 | regex: "github/grpc-java/**/build/test-results/**/sponge_log.xml" 11 | regex: "github/grpc-java/mvn-artifacts/**" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildscripts/kokoro/xds_k8s_lb.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 300 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "lb" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/xds_url_map.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/psm-interop-test-java.sh" 5 | timeout_mins: 90 6 | 7 | action { 8 | define_artifacts { 9 | regex: "artifacts/**/*sponge_log.xml" 10 | regex: "artifacts/**/*.log" 11 | strip_prefix: "artifacts" 12 | } 13 | } 14 | env_vars { 15 | key: "PSM_TEST_SUITE" 16 | value: "url_map" 17 | } 18 | -------------------------------------------------------------------------------- /buildscripts/kokoro/xds_v3.cfg: -------------------------------------------------------------------------------- 1 | # Config file for internal CI 2 | 3 | # Location of the continuous shell script in repository. 4 | build_file: "grpc-java/buildscripts/kokoro/xds_v3.sh" 5 | timeout_mins: 360 6 | action { 7 | define_artifacts { 8 | regex: "**/*sponge_log.*" 9 | regex: "github/grpc/reports/**" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /buildscripts/observability-test/build_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2023 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 | cd "$(dirname "$0")"/../.. 18 | 19 | # Environment Variables: 20 | # 21 | # TAG_NAME: the docker image tag name 22 | # 23 | 24 | echo Building ${TAG_NAME} 25 | 26 | docker build --no-cache -t ${TAG_NAME} -f ./buildscripts/observability-test/Dockerfile . 27 | -------------------------------------------------------------------------------- /buildscripts/observability-test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2023 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 | cd "$(dirname "$0")"/../.. 18 | 19 | if [ "$1" = "server" ] ; then 20 | /grpc-java/bin/gcp-observability-interop server --use_tls=false "${@:2}" 21 | 22 | elif [ "$1" = "client" ] ; then 23 | /grpc-java/bin/gcp-observability-interop client --use_tls=false "${@:2}" 24 | 25 | else 26 | echo "Invalid action: $1. Usage:" 27 | echo " $ .../run.sh [server|client] --server_host= --server_port= ..." 28 | exit 1 29 | fi 30 | -------------------------------------------------------------------------------- /buildscripts/run_in_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu -o pipefail 3 | 4 | quote() { 5 | local arg 6 | for arg in "$@"; do 7 | printf "'" 8 | printf "%s" "$arg" | sed -e "s/'/'\\\\''/g" 9 | printf "' " 10 | done 11 | } 12 | 13 | readonly docker_image=$1; shift 14 | 15 | readonly grpc_java_dir="$(dirname "$(readlink -f "$0")")/.." 16 | if [[ -t 0 ]]; then 17 | DOCKER_ARGS="-it" 18 | else 19 | # The input device on kokoro is not a TTY, so -it does not work. 20 | DOCKER_ARGS= 21 | fi 22 | # Use a trap function to fix file permissions upon exit, without affecting 23 | # the original exit code. $DOCKER_ARGS can not be quoted, otherwise it becomes a '' which confuses 24 | # docker. 25 | exec docker run $DOCKER_ARGS --rm=true -v "${grpc_java_dir}":/grpc-java -w /grpc-java \ 26 | $docker_image \ 27 | bash -c "function fixFiles() { chown -R $(id -u):$(id -g) /grpc-java; }; trap fixFiles EXIT; $(quote "$@")" 28 | -------------------------------------------------------------------------------- /buildscripts/sign-local-repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2017 The 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 | 18 | if [ $# -ne 1 ]; then 19 | cat < "$tmpdir/grpc-java.lst" 17 | 18 | (cd "$base" && find . -name "*.proto") | sort > "$tmpdir/base.lst" 19 | echo "Files synced:" 20 | comm -12 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst" 21 | 22 | echo 23 | echo "Files in grpc-proto not synced:" 24 | comm -13 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst" 25 | 26 | echo 27 | echo "Files in grpc-java not synced:" 28 | comm -23 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst" 29 | 30 | rm -r "$tmpdir" 31 | -------------------------------------------------------------------------------- /buildscripts/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Linux) 2 | 3 | set(CMAKE_C_COMPILER "${crosscompile_ARCH}-gcc") 4 | set(CMAKE_CXX_COMPILER "${crosscompile_ARCH}-g++") 5 | set(CMAKE_FIND_ROOT_PATH "/usr/${crosscompile_ARCH}/") 6 | 7 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 8 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 9 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 10 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | steps: 2 | - name: 'gcr.io/cloud-builders/docker' 3 | args: 4 | - 'build' 5 | - '--tag=${_SERVER_IMAGE_NAME}:${COMMIT_SHA}' 6 | - '--tag=${_SERVER_IMAGE_NAME}:${BRANCH_NAME}' 7 | - '--file=test-server.Dockerfile' 8 | - '.' 9 | 10 | - name: 'gcr.io/cloud-builders/docker' 11 | args: 12 | - 'build' 13 | - '--tag=${_CLIENT_IMAGE_NAME}:${COMMIT_SHA}' 14 | - '--tag=${_CLIENT_IMAGE_NAME}:${BRANCH_NAME}' 15 | - '--file=test-client.Dockerfile' 16 | - '.' 17 | 18 | substitutions: 19 | _SERVER_IMAGE_NAME: us-docker.pkg.dev/grpc-testing/psm-interop/java-server 20 | _CLIENT_IMAGE_NAME: us-docker.pkg.dev/grpc-testing/psm-interop/java-client 21 | 22 | images: 23 | - '${_SERVER_IMAGE_NAME}:${COMMIT_SHA}' 24 | - '${_SERVER_IMAGE_NAME}:${BRANCH_NAME}' 25 | - '${_CLIENT_IMAGE_NAME}:${COMMIT_SHA}' 26 | - '${_CLIENT_IMAGE_NAME}:${BRANCH_NAME}' 27 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/logging-debug.properties: -------------------------------------------------------------------------------- 1 | handlers=java.util.logging.ConsoleHandler 2 | io.grpc.ChannelLogger.level=FINEST 3 | io.grpc.level=FINEST 4 | io.netty.level=FINEST 5 | java.util.logging.ConsoleHandler.level=ALL 6 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 7 | java.util.logging.SimpleFormatter.format=[%1$tF %1$tT.%1$tL %1tZ] [%4$-7s] [%3$s] %5$s %6$s %n 8 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/logging-json.properties: -------------------------------------------------------------------------------- 1 | handlers=java.util.logging.ConsoleHandler 2 | java.util.logging.ConsoleHandler.level=FINEST 3 | java.util.logging.ConsoleHandler.formatter=io.github.devatherock.json.formatter.JSONFormatter 4 | io.github.devatherock.json.formatter.JSONFormatter.key_timestamp=time 5 | io.github.devatherock.json.formatter.JSONFormatter.key_log_level=severity 6 | io.github.devatherock.json.formatter.JSONFormatter.use_slf4j_level_names=true 7 | io.grpc.ChannelLogger.level=FINEST 8 | io.grpc.xds.level=FINEST 9 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/logging.properties: -------------------------------------------------------------------------------- 1 | handlers=java.util.logging.ConsoleHandler 2 | io.grpc.ChannelLogger.level=FINEST 3 | io.grpc.xds.level=FINEST 4 | java.util.logging.ConsoleHandler.level=FINEST 5 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 6 | java.util.logging.SimpleFormatter.format=[%1$tF %1$tT.%1$tL %1tZ] [%4$-7s] [%3$s] %5$s %6$s %n 7 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/test-client.Dockerfile: -------------------------------------------------------------------------------- 1 | # Build runtime image. 2 | FROM eclipse-temurin:11-jre 3 | 4 | ENV APP_DIR=/usr/src/app 5 | WORKDIR $APP_DIR 6 | 7 | # Install the app 8 | COPY grpc-interop-testing/ $APP_DIR/ 9 | 10 | # Copy all logging profiles, use json logging by default 11 | COPY logging*.properties $APP_DIR/ 12 | ENV JAVA_OPTS="-Djava.util.logging.config.file=$APP_DIR/logging-json.properties" 13 | 14 | # Intentionally after the app COPY to force the update on each build. 15 | # Update Ubuntu system packages: 16 | RUN apt-get update \ 17 | && apt-get -y upgrade \ 18 | && apt-get -y autoremove \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # Client 22 | ENTRYPOINT ["bin/xds-test-client"] 23 | -------------------------------------------------------------------------------- /buildscripts/xds-k8s/test-server.Dockerfile: -------------------------------------------------------------------------------- 1 | # Build runtime image. 2 | FROM eclipse-temurin:11-jre 3 | 4 | ENV APP_DIR=/usr/src/app 5 | WORKDIR $APP_DIR 6 | 7 | # Install the app 8 | COPY grpc-interop-testing/ $APP_DIR/ 9 | 10 | # Copy all logging profiles, use json logging by default 11 | COPY logging*.properties $APP_DIR/ 12 | ENV JAVA_OPTS="-Djava.util.logging.config.file=$APP_DIR/logging-json.properties" 13 | 14 | # Intentionally after the app COPY to force the update on each build. 15 | # Update Ubuntu system packages: 16 | RUN apt-get update \ 17 | && apt-get -y upgrade \ 18 | && apt-get -y autoremove \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | # Server 22 | ENTRYPOINT ["bin/xds-test-server"] 23 | -------------------------------------------------------------------------------- /buildscripts/xds_logging.properties: -------------------------------------------------------------------------------- 1 | handlers=java.util.logging.ConsoleHandler 2 | io.grpc.ChannelLogger.level=FINEST 3 | io.grpc.xds.level=FINEST 4 | java.util.logging.ConsoleHandler.level=FINEST 5 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 6 | -------------------------------------------------------------------------------- /census/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "census", 5 | srcs = glob([ 6 | "src/main/java/**/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//api", 11 | "//context", 12 | artifact("com.google.code.findbugs:jsr305"), 13 | artifact("com.google.errorprone:error_prone_annotations"), 14 | artifact("com.google.guava:guava"), 15 | artifact("io.opencensus:opencensus-api"), 16 | artifact("io.opencensus:opencensus-contrib-grpc-metrics"), 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | patch: 4 | default: 5 | target: '80' 6 | project: 7 | default: 8 | target: auto 9 | threshold: 1 10 | changes: 11 | default: 12 | branches: 13 | - nonExistantBranchToDisableTheFeature 14 | comment: off 15 | -------------------------------------------------------------------------------- /context/BUILD.bazel: -------------------------------------------------------------------------------- 1 | java_library( 2 | name = "context", 3 | visibility = ["//visibility:public"], 4 | exports = ["//api"], 5 | ) 6 | -------------------------------------------------------------------------------- /context/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java-library" 3 | id "maven-publish" 4 | } 5 | 6 | description = 'gRPC: Context' 7 | 8 | dependencies { 9 | runtimeOnly (project(":grpc-api")) { 10 | exclude group: "com.google.guava", module: "guava" 11 | exclude group: "com.google.code.findbugs", module: "jsr305" 12 | exclude group: "com.google.errorprone", module: "error_prone_annotations" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /contextstorage/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java-library" 3 | id "maven-publish" 4 | 5 | id "ru.vyarus.animalsniffer" 6 | } 7 | 8 | description = 'gRPC: ContextStorageOverride' 9 | 10 | dependencies { 11 | api project(':grpc-api') 12 | implementation libraries.opentelemetry.api 13 | 14 | testImplementation libraries.junit, 15 | libraries.opentelemetry.sdk.testing, 16 | libraries.assertj.core 17 | testImplementation 'junit:junit:4.13.1'// opentelemetry.sdk.testing uses compileOnly for assertj 18 | 19 | signature (libraries.signature.java) { 20 | artifact { 21 | extension = "signature" 22 | } 23 | } 24 | signature (libraries.signature.android) { 25 | artifact { 26 | extension = "signature" 27 | } 28 | } 29 | } 30 | 31 | tasks.named("jar").configure { 32 | manifest { 33 | attributes('Automatic-Module-Name': 'io.grpc.override') 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core/src/bazel-internal/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.internal.PickFirstLoadBalancerProvider 2 | -------------------------------------------------------------------------------- /core/src/bazel-internal/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.internal.DnsNameResolverProvider 2 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/AuthorityVerifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025 The 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 | package io.grpc.internal; 18 | 19 | import io.grpc.Status; 20 | 21 | /** Verifier for the outgoing authority pseudo-header against peer cert. */ 22 | public interface AuthorityVerifier { 23 | Status verifyAuthority(String authority); 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/BackoffPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * Determines how long to wait before doing some action (typically a retry, or a reconnect). 21 | */ 22 | public interface BackoffPolicy { 23 | interface Provider { 24 | BackoffPolicy get(); 25 | } 26 | 27 | /** 28 | * Returns the number of nanoseconds to wait. 29 | */ 30 | long nextBackoffNanos(); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/ConcurrentTimeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc.internal; 18 | 19 | import java.util.concurrent.TimeUnit; 20 | 21 | /** 22 | * {@link ConcurrentTimeProvider} resolves ConcurrentTimeProvider which implements 23 | * {@link TimeProvider}. 24 | */ 25 | 26 | final class ConcurrentTimeProvider implements TimeProvider { 27 | 28 | @Override 29 | public long currentTimeNanos() { 30 | return TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/LongCounter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * An interface for a long base counter. 21 | */ 22 | public interface LongCounter { 23 | /** Adds the delta to this counter. */ 24 | void add(long delta); 25 | 26 | /** Returns the value of this counter. */ 27 | long value(); 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/LongCounterFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * A factory for creating {@link LongCounter} objects. The concrete implementation returned may 21 | * be platform dependent. 22 | */ 23 | final class LongCounterFactory { 24 | /** 25 | * Creates a LongCounter. 26 | */ 27 | public static LongCounter create() { 28 | if (ReflectionLongAdderCounter.isAvailable()) { 29 | return new ReflectionLongAdderCounter(); 30 | } else { 31 | return new AtomicLongCounter(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/ObjectPool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc.internal; 18 | 19 | import javax.annotation.concurrent.ThreadSafe; 20 | 21 | /** 22 | * An object pool. 23 | */ 24 | @ThreadSafe 25 | public interface ObjectPool { 26 | /** 27 | * Get an object from the pool. 28 | */ 29 | T getObject(); 30 | 31 | /** 32 | * Return the object to the pool. The caller should not use the object beyond this point. 33 | * 34 | * @return always {@code null} 35 | */ 36 | T returnObject(Object object); 37 | } 38 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/ThreadOptimizedDeframer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * A {@code Deframer} that optimizations by taking over part of the thread safety. 21 | */ 22 | public interface ThreadOptimizedDeframer extends Deframer { 23 | /** 24 | * Behaves like {@link Deframer#request(int)} except it can be called from any thread. Must not 25 | * throw exceptions in case of deframer error. 26 | */ 27 | @Override 28 | void request(int numMessages); 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/TimeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * Time source representing the current system time in nanos. Used to inject a fake clock 21 | * into unit tests. 22 | */ 23 | public interface TimeProvider { 24 | /** Returns the current nano time. */ 25 | long currentTimeNanos(); 26 | 27 | TimeProvider SYSTEM_TIME_PROVIDER = TimeProviderResolverFactory.resolveTimeProvider(); 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/TimeProviderResolverFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * {@link TimeProviderResolverFactory} resolves Time providers. 21 | */ 22 | 23 | final class TimeProviderResolverFactory { 24 | static TimeProvider resolveTimeProvider() { 25 | try { 26 | Class.forName("java.time.Instant"); 27 | return new InstantTimeProvider(); 28 | } catch (ClassNotFoundException ex) { 29 | return new ConcurrentTimeProvider(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/io/grpc/internal/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | * Interfaces and implementations that are internal to gRPC. 19 | * 20 | *

All the content under this package and its subpackages are considered annotated with {@link 21 | * io.grpc.Internal}. 22 | */ 23 | @io.grpc.Internal 24 | package io.grpc.internal; 25 | -------------------------------------------------------------------------------- /core/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.internal.PickFirstLoadBalancerProvider 2 | -------------------------------------------------------------------------------- /core/src/main/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.internal.DnsNameResolverProvider 2 | -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_corrupted_cert.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "spiffe_sequence": 123, 5 | "keys": [ 6 | { 7 | "kty": "RSA", 8 | "use": "x509-svid", 9 | "x5c": ["UNPARSABLE_CERTIFICATE"] 10 | } 11 | ] 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_duplicates.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "spiffe_sequence": 123, 5 | "keys": [ 6 | { 7 | "x5c": "VALUE_DOESN'T_MATTER" 8 | } 9 | ] 10 | }, 11 | "google.com": { 12 | "spiffe_sequence": 123, 13 | "keys": [ 14 | { 15 | "use": "x509-svid", 16 | "kid": "some_value", 17 | "x5c": "VALUE_DOESN'T_MATTER" 18 | } 19 | ] 20 | }, 21 | "test.google.com.au": {} 22 | } 23 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_malformed.json: -------------------------------------------------------------------------------- 1 | [ 2 | "test.google.com", 3 | "test.google.com.au" 4 | ] -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_wrong_kid.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "spiffe_sequence": 123, 5 | "keys": [ 6 | { 7 | "kty": "RSA", 8 | "use": "x509-svid", 9 | "kid": "some_value", 10 | "x5c": "VALUE_DOESN'T_MATTER" 11 | } 12 | ] 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_wrong_kty.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "spiffe_sequence": 123, 5 | "keys": [ 6 | { 7 | "x5c": "VALUE_DOESN'T_MATTER" 8 | } 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_wrong_root.json: -------------------------------------------------------------------------------- 1 | { 2 | "trustDomains": { 3 | "test.google.com": {}, 4 | "test.google.com.au": {} 5 | } 6 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_wrong_seq_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "spiffe_sequence": 123.5, 5 | "keys": [ 6 | { 7 | "x5c": "VALUE_DOESN'T_MATTER" 8 | } 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/spiffebundle_wrong_use.json: -------------------------------------------------------------------------------- 1 | { 2 | "trust_domains": { 3 | "google.com": { 4 | "keys": [ 5 | { 6 | "kty": "RSA", 7 | "use": "i_am_not_x509-svid", 8 | "x5c": "VALUE_DOESN'T_MATTER" 9 | } 10 | ] 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /core/src/test/resources/io/grpc/internal/uncompressable.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/core/src/test/resources/io/grpc/internal/uncompressable.bin -------------------------------------------------------------------------------- /core/src/testFixtures/java/io/grpc/internal/PickFirstLoadBalancerProviderAccessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024 The 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 | package io.grpc.internal; 18 | 19 | /** 20 | * Accessor for PickFirstLoadBalancerProvider, allowing access only during tests. 21 | */ 22 | public final class PickFirstLoadBalancerProviderAccessor { 23 | private PickFirstLoadBalancerProviderAccessor() {} 24 | 25 | public static void setEnableNewPickFirst(boolean enableNewPickFirst) { 26 | PickFirstLoadBalancerProvider.enableNewPickFirst = enableNewPickFirst; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cronet/.gitignore: -------------------------------------------------------------------------------- 1 | libs/ 2 | -------------------------------------------------------------------------------- /cronet/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn org.chromium.** 13 | -dontnote org.chromium.** 14 | -------------------------------------------------------------------------------- /cronet/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/.bazelrc: -------------------------------------------------------------------------------- 1 | build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 2 | -------------------------------------------------------------------------------- /examples/WORKSPACE.bzlmod: -------------------------------------------------------------------------------- 1 | # When using bzlmod this makes sure nothing from the legacy WORKSPACE is loaded 2 | -------------------------------------------------------------------------------- /examples/android/README.md: -------------------------------------------------------------------------------- 1 | gRPC Hello World Example (Android Java) 2 | ======================== 3 | 4 | PREREQUISITES 5 | ------------- 6 | - [Java gRPC](https://github.com/grpc/grpc-java) 7 | 8 | - [Android Tutorial](https://developer.android.com/training/basics/firstapp/index.html) if you're new to Android development 9 | 10 | - [gRPC Java Android Quick Start Guide](https://grpc.io/docs/quickstart/android.html) 11 | 12 | - We only have Android gRPC client in this example. Please follow examples in other languages to build and run a gRPC server. 13 | 14 | INSTALL 15 | ------- 16 | 17 | 1. **[Install gRPC Java library SNAPSHOT locally, including code generation plugin](../../COMPILING.md) (Only need this step for non-released versions, e.g. master HEAD).** 18 | 19 | 2. Install the app 20 | ```sh 21 | $ cd helloworld # or "cd routeguide" 22 | $ ../../gradlew installDebug 23 | ``` 24 | 25 | Please refer to the 26 | [tutorial](https://grpc.io/docs/tutorials/basic/android.html) on 27 | how to use gRPC in Android programs. 28 | -------------------------------------------------------------------------------- /examples/android/clientcache/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn com.google.common.** 13 | # Ignores: can't find referenced class javax.lang.model.element.Modifier 14 | -dontwarn com.google.errorprone.annotations.** 15 | -dontwarn javax.naming.** 16 | -dontwarn okio.** 17 | -dontwarn sun.misc.Unsafe 18 | -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/clientcache/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/clientcache/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/clientcache/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/clientcache/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/clientcache/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GrpcClientCacheExample 3 | 4 | -------------------------------------------------------------------------------- /examples/android/clientcache/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.0' 10 | classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | mavenLocal() 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/android/clientcache/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /examples/android/helloworld/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /gradle.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | .idea/ 9 | 10 | *.iml 11 | *.apk 12 | *.ap_ 13 | *.dex 14 | *.class 15 | bin/ 16 | gen/ 17 | .gradle/ 18 | /*/build/ 19 | local.properties 20 | proguard/ 21 | *.log 22 | -------------------------------------------------------------------------------- /examples/android/helloworld/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn com.google.common.** 13 | # Ignores: can't find referenced class javax.lang.model.element.Modifier 14 | -dontwarn com.google.errorprone.annotations.** 15 | -dontwarn javax.naming.** 16 | -dontwarn okio.** 17 | -dontwarn sun.misc.Unsafe 18 | -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/helloworld/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/helloworld/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/helloworld/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/helloworld/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/helloworld/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GrpcHelloworldExample 3 | 4 | -------------------------------------------------------------------------------- /examples/android/helloworld/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.0' 10 | classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | mavenLocal() 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/android/helloworld/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /examples/android/routeguide/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /gradle.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | .idea/ 9 | 10 | *.iml 11 | *.apk 12 | *.ap_ 13 | *.dex 14 | *.class 15 | bin/ 16 | gen/ 17 | .gradle/ 18 | /*/build/ 19 | local.properties 20 | proguard/ 21 | *.log 22 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn sun.misc.Unsafe 13 | -dontwarn com.google.common.** 14 | -dontwarn javax.naming.** 15 | -dontwarn okio.** 16 | # Ignores: can't find referenced class javax.lang.model.element.Modifier 17 | -dontwarn com.google.errorprone.annotations.** 18 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/routeguide/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/routeguide/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/routeguide/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/routeguide/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/routeguide/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RouteGuideExample 3 | 4 | -------------------------------------------------------------------------------- /examples/android/routeguide/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/android/routeguide/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.0' 10 | classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | mavenLocal() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { delete rootProject.buildDir } 26 | -------------------------------------------------------------------------------- /examples/android/routeguide/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /examples/android/strictmode/README.md: -------------------------------------------------------------------------------- 1 | gRPC Android StrictMode Example 2 | ======================== 3 | 4 | - This example intends to show the compatibility of gRPC with Android StrictMode. 5 | - Android SDK version 28 is required for [`StrictMode.VmPolicy.Builder.penaltyListener`](https://developer.android.com/reference/android/os/StrictMode.VmPolicy.Builder.html#penaltyListener(java.util.concurrent.Executor,%20android.os.StrictMode.OnVmViolationListener)) used in the example. 6 | - This example does the same thing as [HelloWorld example](../helloworld) except popping up a dialog for detected StrictMode policy violation (shown below). 7 | 8 | ![demo img](./demo.png) 9 | -------------------------------------------------------------------------------- /examples/android/strictmode/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_HOME/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | -dontwarn com.google.common.** 13 | # Ignores: can't find referenced class javax.lang.model.element.Modifier 14 | -dontwarn com.google.errorprone.annotations.** 15 | -dontwarn javax.naming.** 16 | -dontwarn okio.** 17 | -dontwarn sun.misc.Unsafe 18 | -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/strictmode/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/strictmode/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/strictmode/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/strictmode/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/android/strictmode/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GrpcStrictModeHelloworldExample 3 | 4 | -------------------------------------------------------------------------------- /examples/android/strictmode/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.0' 10 | classpath "com.google.protobuf:protobuf-gradle-plugin:0.9.5" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | mavenLocal() 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/android/strictmode/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/android/strictmode/demo.png -------------------------------------------------------------------------------- /examples/android/strictmode/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /examples/example-alts/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-debug/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-debug' 2 | -------------------------------------------------------------------------------- /examples/example-dualstack/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | 7 | rootProject.name = 'example-dualstack' 8 | -------------------------------------------------------------------------------- /examples/example-gauth/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library") 2 | 3 | java_library( 4 | name = "example-gauth", 5 | testonly = 1, 6 | srcs = glob( 7 | ["src/main/java/**/*.java"], 8 | ), 9 | deps = [ 10 | "@io_grpc_grpc_java//api", 11 | "@io_grpc_grpc_java//auth", 12 | "@io_grpc_grpc_java//protobuf", 13 | "@io_grpc_grpc_java//stub", 14 | "@maven//:com_google_api_grpc_grpc_google_cloud_pubsub_v1", 15 | "@maven//:com_google_api_grpc_proto_google_cloud_pubsub_v1", 16 | "@maven//:com_google_auth_google_auth_library_oauth2_http", 17 | ], 18 | ) 19 | 20 | java_binary( 21 | name = "google-auth-client", 22 | testonly = 1, 23 | main_class = "io.grpc.examples.googleAuth.GoogleAuthClient", 24 | runtime_deps = [ 25 | ":example-gauth", 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /examples/example-gauth/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-gcp-csm-observability/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-gcp-csm-observability' 2 | -------------------------------------------------------------------------------- /examples/example-gcp-observability/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-gcp-observability' 2 | -------------------------------------------------------------------------------- /examples/example-gcp-observability/src/main/resources/io/grpc/examples/gcpobservability/gcp_observability_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "cloud_monitoring": {}, 3 | "cloud_trace": { 4 | "sampling_rate": 1.0 5 | }, 6 | "cloud_logging": { 7 | "client_rpc_events": [{ 8 | "methods": ["helloworld.Greeter/*"] 9 | }], 10 | "server_rpc_events": [{ 11 | "methods": ["helloworld.Greeter/*"] 12 | }] 13 | }, 14 | "labels": { 15 | "environment" : "example-client" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/example-gcp-observability/src/main/resources/io/grpc/examples/gcpobservability/gcp_observability_server_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "cloud_monitoring": {}, 3 | "cloud_trace": { 4 | "sampling_rate": 1.0 5 | }, 6 | "cloud_logging": { 7 | "client_rpc_events": [{ 8 | "methods": ["helloworld.Greeter/*"] 9 | }], 10 | "server_rpc_events": [{ 11 | "methods": ["helloworld.Greeter/*"] 12 | }] 13 | }, 14 | "labels": { 15 | "environment" : "example-server" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/example-hostname/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'hostname' 2 | -------------------------------------------------------------------------------- /examples/example-jwt-auth/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-oauth/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-opentelemetry/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-opentelemetry' 2 | -------------------------------------------------------------------------------- /examples/example-orca/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-orca' 2 | -------------------------------------------------------------------------------- /examples/example-reflection/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-reflection' 2 | -------------------------------------------------------------------------------- /examples/example-servlet/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.google.protobuf' version '0.9.5' 3 | // Generate IntelliJ IDEA's .idea & .iml project files 4 | id 'idea' 5 | id 'war' 6 | } 7 | 8 | repositories { 9 | mavenCentral() 10 | mavenLocal() 11 | } 12 | 13 | java { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | def grpcVersion = '1.74.0-SNAPSHOT' // CURRENT_GRPC_VERSION 19 | def protocVersion = '3.25.5' 20 | 21 | dependencies { 22 | implementation "io.grpc:grpc-protobuf:${grpcVersion}", 23 | "io.grpc:grpc-servlet:${grpcVersion}", 24 | "io.grpc:grpc-stub:${grpcVersion}" 25 | 26 | compileOnly "javax.servlet:javax.servlet-api:4.0.1", 27 | "org.apache.tomcat:annotations-api:6.0.53" 28 | } 29 | 30 | protobuf { 31 | protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" } 32 | plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } } 33 | generateProtoTasks { 34 | all()*.plugins { grpc {} } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/example-servlet/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-servlet/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/example-servlet/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | / 9 | 10 | -------------------------------------------------------------------------------- /examples/example-tls/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/example-xds/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example-xds' 2 | -------------------------------------------------------------------------------- /examples/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/examples/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/logging.properties: -------------------------------------------------------------------------------- 1 | # Create a file called logging.properties with the following contents. 2 | handlers=java.util.logging.ConsoleHandler 3 | io.grpc.level=FINE 4 | java.util.logging.ConsoleHandler.level=ALL 5 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 6 | 7 | # Pass the location of the file to JVM via this command-line flag 8 | JAVA_OPTS=-Djava.util.logging.config.file=logging.properties 9 | -------------------------------------------------------------------------------- /examples/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | } 5 | } 6 | 7 | rootProject.name = 'examples' 8 | -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/advanced/README.md: -------------------------------------------------------------------------------- 1 | gRPC JSON Serialization Example 2 | ===================== 3 | 4 | gRPC is a modern high-performance framework for building Remote Procedure Call (RPC) systems. 5 | It commonly uses Protocol Buffers (Protobuf) as its serialization format, which is compact and efficient. 6 | However, gRPC can also support JSON serialization when needed, typically for interoperability with 7 | systems or clients that do not use Protobuf. 8 | This is an advanced example of how to swap out the serialization logic, Normal users do not need to do this. 9 | This code is not intended to be a production-ready implementation, since JSON encoding is slow. 10 | Additionally, JSON serialization as implemented may be not resilient to malicious input. 11 | 12 | This advanced example uses Marshaller for JSON which marshals in the Protobuf 3 format described here 13 | https://developers.google.com/protocol-buffers/docs/proto3#json 14 | 15 | If you are considering implementing your own serialization logic, contact the grpc team at 16 | https://groups.google.com/forum/#!forum/grpc-io 17 | -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/cancellation/README.md: -------------------------------------------------------------------------------- 1 | gRPC Cancellation Example 2 | ===================== 3 | 4 | When a gRPC client is no longer interested in the result of an RPC call, 5 | it may cancel to signal this discontinuation of interest to the server. 6 | 7 | Any abort of an ongoing RPC is considered "cancellation" of that RPC. 8 | The common causes of cancellation are the client explicitly cancelling, the deadline expires, and I/O failures. 9 | The service is not informed the reason for the cancellation. 10 | 11 | There are two APIs for services to be notified of RPC cancellation: io.grpc.Context and ServerCallStreamObserver 12 | 13 | Context listeners are called on a different thread, so need to be thread-safe. 14 | The ServerCallStreamObserver cancellation callback is called like other StreamObserver callbacks, 15 | so the application may not need thread-safe handling. 16 | Both APIs have thread-safe isCancelled() polling methods. 17 | 18 | Refer the gRPC documentation for details on Cancellation of RPCs https://grpc.io/docs/guides/cancellation/ 19 | -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/deadline/README.md: -------------------------------------------------------------------------------- 1 | gRPC Deadline Example 2 | ===================== 3 | 4 | A Deadline is used to specify a point in time past which a client is unwilling to wait for a response from a server. 5 | This simple idea is very important in building robust distributed systems. 6 | Clients that do not wait around unnecessarily and servers that know when to give up processing requests will improve the resource utilization and latency of your system. 7 | 8 | Note that while some language APIs have the concept of a deadline, others use the idea of a timeout. 9 | When an API asks for a deadline, you provide a point in time which the call should not go past. 10 | A timeout is the max duration of time that the call can take. 11 | A timeout can be converted to a deadline by adding the timeout to the current time when the application starts a call. 12 | 13 | This Example gives usage and implementation of Deadline on Server, Client and Propagation. 14 | 15 | Refer the gRPC documentation for more details on Deadlines https://grpc.io/docs/guides/deadlines/ -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/errordetails/README.md: -------------------------------------------------------------------------------- 1 | gRPC Error Details Example 2 | ===================== 3 | 4 | If a gRPC call completes successfully the server returns an OK status to the client (depending on the language the OK status may or may not be directly used in your code). 5 | But what happens if the call isn’t successful? 6 | 7 | This Example gives the usage and implementation of how return the error details if gRPC call not successful or fails 8 | and how to set and read com.google.rpc.Status objects as google.rpc.Status error details. 9 | 10 | gRPC allows detailed error information to be encapsulated in protobuf messages, which are sent alongside the status codes. 11 | 12 | If an error occurs, gRPC returns one of its error status codes with error message that provides further error details about what happened. 13 | 14 | Refer the below links for more details on error details and status codes 15 | - https://grpc.io/docs/guides/error/ 16 | - https://github.com/grpc/grpc-java/blob/master/api/src/main/java/io/grpc/Status.java -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/experimental/README.md: -------------------------------------------------------------------------------- 1 | gRPC Compression Example 2 | ===================== 3 | 4 | This example shows how clients can specify compression options when performing RPCs, 5 | and how to enable compressed(i,e gzip) requests/responses for only particular method and in case of all methods by using the interceptors. 6 | 7 | Compression is used to reduce the amount of bandwidth used when communicating between client/server or peers and 8 | can be enabled or disabled based on call or message level for all languages. 9 | 10 | gRPC allows asymmetrically compressed communication, whereby a response may be compressed differently with the request, 11 | or not compressed at all. 12 | 13 | Refer the gRPC documentation for more details on Compression https://grpc.io/docs/guides/compression/ -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/header/README.md: -------------------------------------------------------------------------------- 1 | gRPC Custom Header Example 2 | ===================== 3 | 4 | This example gives the usage and implementation of how to create and process(send/receive) the custom headers between Client and Server 5 | using the interceptors (HeaderServerInterceptor, ClientServerInterceptor) along with Metadata. 6 | 7 | Metadata is a side channel that allows clients and servers to provide information to each other that is associated with an RPC. 8 | gRPC metadata is a key-value pair of data that is sent with initial or final gRPC requests or responses. 9 | It is used to provide additional information about the call, such as authentication credentials, 10 | tracing information, or custom headers. 11 | 12 | gRPC metadata can be used to send custom headers to the server or from the server to the client. 13 | This can be used to implement application-specific features, such as load balancing, 14 | rate limiting or providing detailed error messages from the server to the client. 15 | 16 | Refer the gRPC documentation for more on Metadata/Headers https://grpc.io/docs/guides/metadata/ -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/healthservice/README.md: -------------------------------------------------------------------------------- 1 | gRPC Health Service Example 2 | ===================== 3 | 4 | The Health Service example provides a HelloWorld gRPC server that doesn't like short names along with a 5 | health service. It also provides a client application which makes HelloWorld 6 | calls and checks the health status. 7 | 8 | The client application also shows how the round robin load balancer can 9 | utilize the health status to avoid making calls to a service that is 10 | not actively serving. 11 | -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/helloworld/README.md: -------------------------------------------------------------------------------- 1 | gRPC Hello World Example 2 | ===================== 3 | This Example gives the details about basic implementation of gRPC Client and Server along with 4 | how the communication happens between them by sending a greeting message. 5 | 6 | Refer the gRPC documentation for more details on helloworld.proto specification, creation of gRPC services and 7 | methods along with Execution process https://grpc.io/docs/languages/java/quickstart/ -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/keepalive/README.md: -------------------------------------------------------------------------------- 1 | gRPC Keepalive Example 2 | ===================== 3 | 4 | This example gives the usage and implementation of the Keepalives methods, configurations in gRPC Client and 5 | Server and how the communication happens between them. 6 | 7 | HTTP/2 PING-based keepalives are a way to keep an HTTP/2 connection alive even when there is no data being transferred. 8 | This is done by periodically sending a PING Frames to the other end of the connection. 9 | HTTP/2 keepalives can improve performance and reliability of HTTP/2 connections, 10 | but it is important to configure the keepalive interval carefully. 11 | 12 | gRPC sends http2 pings on the transport to detect if the connection is down. 13 | If the ping is not acknowledged by the other side within a certain period, the connection will be closed. 14 | Note that pings are only necessary when there's no activity on the connection. 15 | 16 | Refer the gRPC documentation for more on Keepalive details and configurations https://grpc.io/docs/guides/keepalive/ -------------------------------------------------------------------------------- /examples/src/main/java/io/grpc/examples/preserialized/README.md: -------------------------------------------------------------------------------- 1 | gRPC Pre-Serialized Messages Example 2 | ===================== 3 | 4 | This example gives the usage and implementation of pre-serialized request and response messages 5 | communication/exchange between grpc client and server by using ByteArrayMarshaller which produces 6 | a byte[] instead of decoding into typical POJOs. 7 | 8 | This is a performance optimization that can be useful if you read the request/response from on-disk or a database 9 | where it is already serialized, or if you need to send the same complicated message to many clients and servers. 10 | The same approach can avoid deserializing requests/responses, to be stored in a database. 11 | 12 | It shows how to modify MethodDescriptor to use bytes as the response instead of HelloReply. By 13 | adjusting toBuilder() you can choose which of the request and response are bytes. 14 | The generated bindService() uses ServerCalls to make RPC handlers, Since the generated 15 | bindService() won't expect byte[] in the AsyncService, this uses ServerCalls directly. 16 | 17 | Stubs use ClientCalls to send RPCs, Since the generated stub won't have byte[] in its 18 | method signature, this uses ClientCalls directly. -------------------------------------------------------------------------------- /examples/src/main/resources/io/grpc/examples/hedging/hedging_service_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "methodConfig": [ 3 | { 4 | "name": [ 5 | { 6 | "service": "helloworld.Greeter", 7 | "method": "SayHello" 8 | } 9 | ], 10 | 11 | "hedgingPolicy": { 12 | "maxAttempts": 3, 13 | "hedgingDelay": "1s" 14 | } 15 | } 16 | ], 17 | 18 | "retryThrottling": { 19 | "maxTokens": 10, 20 | "tokenRatio": 0.1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/src/main/resources/io/grpc/examples/retrying/retrying_service_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "methodConfig": [ 3 | { 4 | "name": [ 5 | { 6 | "service": "helloworld.Greeter", 7 | "method": "SayHello" 8 | } 9 | ], 10 | 11 | "retryPolicy": { 12 | "maxAttempts": 5, 13 | "initialBackoff": "0.5s", 14 | "maxBackoff": "30s", 15 | "backoffMultiplier": 2, 16 | "retryableStatusCodes": [ 17 | "UNAVAILABLE" 18 | ] 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /gae-interop-testing/gae-jdk8/src/main/webapp/WEB-INF/appengine-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | java-gae-interop-test 17 | java17 18 | 19 | 20 | -------------------------------------------------------------------------------- /gae-interop-testing/gae-jdk8/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | interoptest 8 | io.grpc.testing.integration.NettyClientInteropServlet 9 | 10 | 11 | longlivedchannel 12 | io.grpc.testing.integration.LongLivedChannel 13 | 14 | 15 | interoptest 16 | / 17 | 18 | 19 | longlivedchannel 20 | /long_lived_channel 21 | 22 | 23 | -------------------------------------------------------------------------------- /gcp-observability/interop/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "application" 3 | 4 | id "ru.vyarus.animalsniffer" 5 | } 6 | 7 | description = "gRPC: Google Cloud Platform Observability Interop" 8 | 9 | dependencies { 10 | implementation project(':grpc-interop-testing'), 11 | project(':grpc-gcp-observability') 12 | 13 | signature (libraries.signature.java) { 14 | artifact { 15 | extension = "signature" 16 | } 17 | } 18 | } 19 | 20 | application { 21 | mainClass = 'io.grpc.gcp.observability.interop.TestServiceInterop' 22 | } 23 | 24 | tasks.named('startScripts').configure { 25 | applicationName = 'gcp-observability-interop' 26 | } 27 | -------------------------------------------------------------------------------- /googleapis/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "googleapis", 5 | srcs = glob([ 6 | "src/main/java/**/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//alts", 11 | "//api", 12 | "//core:internal", 13 | "//xds", 14 | artifact("com.google.guava:guava"), 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /googleapis/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java-library" 3 | id "maven-publish" 4 | 5 | id "ru.vyarus.animalsniffer" 6 | } 7 | 8 | description = 'gRPC: googleapis' 9 | 10 | tasks.named("jar").configure { 11 | manifest { 12 | attributes('Automatic-Module-Name': 'io.grpc.googleapis') 13 | } 14 | } 15 | 16 | dependencies { 17 | api project(':grpc-api') 18 | implementation project(path: ':grpc-alts', configuration: 'shadow'), 19 | project(':grpc-core'), 20 | project(path: ':grpc-xds', configuration: 'shadow'), 21 | libraries.guava.jre // JRE required by transitive protobuf-java-util 22 | testImplementation testFixtures(project(':grpc-core')) 23 | 24 | signature (libraries.signature.java) { 25 | artifact { 26 | extension = "signature" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /googleapis/src/main/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.googleapis.GoogleCloudToProdExperimentalNameResolverProvider 2 | io.grpc.googleapis.GoogleCloudToProdNameResolverProvider 3 | -------------------------------------------------------------------------------- /gradle/javadoc/protobuf.dev-reference-java-api-docs/package-list: -------------------------------------------------------------------------------- 1 | com.google.protobuf 2 | com.google.protobuf.compiler 3 | com.google.protobuf.util 4 | -------------------------------------------------------------------------------- /gradle/javadoc/square.github.io-okhttp-2.x-okhttp/package-list: -------------------------------------------------------------------------------- 1 | com.squareup.okhttp 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-java/142e378cea0aa90aae36fec55f90c30ede95f965/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /grpclb/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | load("//:java_grpc_library.bzl", "java_grpc_library") 3 | 4 | java_library( 5 | name = "grpclb", 6 | srcs = glob([ 7 | "src/main/java/io/grpc/grpclb/*.java", 8 | ]), 9 | resources = glob([ 10 | "src/main/resources/**", 11 | ]), 12 | visibility = ["//visibility:public"], 13 | deps = [ 14 | ":load_balancer_java_grpc", 15 | "//api", 16 | "//context", 17 | "//core:internal", 18 | "//stub", 19 | "//util", 20 | "@com_google_protobuf//:protobuf_java_util", 21 | "@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto", 22 | artifact("com.google.code.findbugs:jsr305"), 23 | artifact("com.google.errorprone:error_prone_annotations"), 24 | artifact("com.google.guava:guava"), 25 | ], 26 | ) 27 | 28 | java_grpc_library( 29 | name = "load_balancer_java_grpc", 30 | srcs = ["@io_grpc_grpc_proto//:grpclb_load_balancer_proto"], 31 | deps = ["@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto"], 32 | ) 33 | -------------------------------------------------------------------------------- /grpclb/src/main/java/io/grpc/grpclb/DropType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | package io.grpc.grpclb; 18 | 19 | /** 20 | * The reason for dropping a request as instructed by the remote balancer. 21 | */ 22 | enum DropType { 23 | RATE_LIMITING, 24 | LOAD_BALANCING 25 | } 26 | -------------------------------------------------------------------------------- /grpclb/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.grpclb.GrpclbLoadBalancerProvider 2 | -------------------------------------------------------------------------------- /grpclb/src/main/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.grpclb.SecretGrpclbNameResolverProvider$Provider 2 | -------------------------------------------------------------------------------- /inprocess/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "inprocess", 5 | srcs = glob([ 6 | "src/main/java/io/grpc/inprocess/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//api", 11 | "//context", 12 | "//core:internal", 13 | artifact("com.google.code.findbugs:jsr305"), 14 | artifact("com.google.errorprone:error_prone_annotations"), 15 | artifact("com.google.guava:guava"), 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /inprocess/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java-library" 3 | id "maven-publish" 4 | 5 | id "ru.vyarus.animalsniffer" 6 | } 7 | 8 | description = 'gRPC: Inprocess' 9 | 10 | tasks.named("jar").configure { 11 | manifest { 12 | attributes('Automatic-Module-Name': 'io.grpc.inprocess') 13 | } 14 | } 15 | 16 | dependencies { 17 | api project(':grpc-api') 18 | 19 | implementation project(':grpc-core') 20 | implementation libraries.guava 21 | testImplementation project(':grpc-testing'), 22 | testFixtures(project(':grpc-core')) 23 | testImplementation libraries.guava.testlib 24 | 25 | signature (libraries.signature.java) { 26 | artifact { 27 | extension = "signature" 28 | } 29 | } 30 | signature (libraries.signature.android) { 31 | artifact { 32 | extension = "signature" 33 | } 34 | } 35 | } 36 | 37 | tasks.named("javadoc").configure { 38 | exclude 'io/grpc/inprocess/Internal*' 39 | } 40 | -------------------------------------------------------------------------------- /inprocess/src/main/java/io/grpc/inprocess/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | * The in-process transport which is for when a server is in the same process as the client. 19 | */ 20 | package io.grpc.inprocess; 21 | -------------------------------------------------------------------------------- /interop-testing/src/main/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 | option java_package = "io.grpc.testing.integration"; 21 | option java_outer_classname = "EmptyProtos"; 22 | 23 | // An empty message that you can re-use to avoid defining duplicated empty 24 | // messages in your project. A typical example is to use it as argument or the 25 | // return value of a service API. For instance: 26 | // 27 | // service Foo { 28 | // rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; 29 | // }; 30 | // 31 | message Empty {} 32 | -------------------------------------------------------------------------------- /interop-testing/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.testing.integration.RpcBehaviorLoadBalancerProvider 2 | -------------------------------------------------------------------------------- /netty/shaded/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | # Publicly exposed in //netty package. Purposefully does not export any symbols. 4 | java_library( 5 | name = "shaded", 6 | visibility = ["//netty:__pkg__"], 7 | runtime_deps = [ 8 | "//netty", 9 | artifact("io.netty:netty-tcnative-boringssl-static"), 10 | artifact("io.netty:netty-tcnative-classes"), 11 | artifact("io.netty:netty-transport-native-unix-common"), 12 | artifact("io.netty:netty-transport-native-epoll_linux_x86_64"), 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /netty/src/main/java/io/grpc/netty/ForcefulCloseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc.netty; 18 | 19 | import io.grpc.Status; 20 | 21 | /** 22 | * A command to trigger close and close all streams. It is buffered differently than normal close 23 | * and also includes reason for closure. 24 | */ 25 | class ForcefulCloseCommand extends WriteQueue.AbstractQueuedCommand { 26 | private final Status status; 27 | 28 | public ForcefulCloseCommand(Status status) { 29 | this.status = status; 30 | } 31 | 32 | public Status getStatus() { 33 | return status; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /netty/src/main/java/io/grpc/netty/GracefulCloseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc.netty; 18 | 19 | import io.grpc.Status; 20 | 21 | /** 22 | * A command to trigger close. It is buffered differently than normal close and also includes 23 | * reason for closure. 24 | */ 25 | class GracefulCloseCommand extends WriteQueue.AbstractQueuedCommand { 26 | private final Status status; 27 | 28 | public GracefulCloseCommand(Status status) { 29 | this.status = status; 30 | } 31 | 32 | public Status getStatus() { 33 | return status; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /netty/src/main/java/io/grpc/netty/StreamIdHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc.netty; 18 | 19 | import io.perfmark.Tag; 20 | 21 | /** Container for stream ids. */ 22 | interface StreamIdHolder { 23 | /** 24 | * Returns the id. 25 | */ 26 | int id(); 27 | 28 | Tag tag(); 29 | } 30 | -------------------------------------------------------------------------------- /netty/src/main/java/io/grpc/netty/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | * The main transport implementation based on Netty, 19 | * for both the client and the server. 20 | */ 21 | @com.google.errorprone.annotations.CheckReturnValue 22 | package io.grpc.netty; 23 | -------------------------------------------------------------------------------- /netty/src/main/resources/META-INF/services/io.grpc.ManagedChannelProvider: -------------------------------------------------------------------------------- 1 | io.grpc.netty.NettyChannelProvider 2 | io.grpc.netty.UdsNettyChannelProvider 3 | -------------------------------------------------------------------------------- /netty/src/main/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.netty.UdsNameResolverProvider 2 | -------------------------------------------------------------------------------- /netty/src/main/resources/META-INF/services/io.grpc.ServerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.netty.NettyServerProvider 2 | -------------------------------------------------------------------------------- /okhttp/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "okhttp", 5 | srcs = glob([ 6 | "third_party/okhttp/main/java/**/*.java", 7 | "src/main/java/**/*.java", 8 | ]), 9 | resources = glob([ 10 | "src/main/resources/**", 11 | ]), 12 | visibility = ["//visibility:public"], 13 | deps = [ 14 | "//api", 15 | "//core:internal", 16 | "//util", 17 | artifact("com.google.code.findbugs:jsr305"), 18 | artifact("com.google.errorprone:error_prone_annotations"), 19 | artifact("com.google.guava:guava"), 20 | artifact("com.squareup.okhttp:okhttp"), 21 | artifact("com.squareup.okio:okio"), 22 | artifact("io.perfmark:perfmark-api"), 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /okhttp/src/main/java/io/grpc/okhttp/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 The 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 | * A lightweight transport based on 19 | * OkHttp, mainly for use on Android 20 | * (client-only). 21 | */ 22 | package io.grpc.okhttp; 23 | -------------------------------------------------------------------------------- /okhttp/src/main/resources/META-INF/services/io.grpc.ManagedChannelProvider: -------------------------------------------------------------------------------- 1 | io.grpc.okhttp.OkHttpChannelProvider 2 | -------------------------------------------------------------------------------- /okhttp/src/main/resources/META-INF/services/io.grpc.ServerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.okhttp.OkHttpServerProvider 2 | -------------------------------------------------------------------------------- /protobuf-lite/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "protobuf-lite", 5 | srcs = glob([ 6 | "src/main/java/**/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//api", 11 | artifact("com.google.code.findbugs:jsr305"), 12 | artifact("com.google.guava:guava"), 13 | ] + select({ 14 | ":android": ["@com_google_protobuf//:protobuf_javalite"], 15 | "//conditions:default": ["@com_google_protobuf//:protobuf_java"], 16 | }), 17 | ) 18 | 19 | # This config is not fully-reliable. If it breaks, it is probably because you 20 | # are changing --android_crosstool_top. Instead of doing that, you can bind 21 | # your own toolchain on top of the default android/crosstool, as mentioned at 22 | # https://github.com/bazelbuild/bazel/issues/3924#issuecomment-338704582 23 | config_setting( 24 | name = "android", 25 | values = { 26 | "crosstool_top": "//external:android/crosstool", 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /protobuf-lite/src/main/java/io/grpc/protobuf/lite/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | * API for gRPC over Protocol Buffers with proto message classes generated by the Lite Runtime 19 | * library. 20 | */ 21 | 22 | package io.grpc.protobuf.lite; 23 | -------------------------------------------------------------------------------- /protobuf-lite/src/test/proto/simple_recursive.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package grpc.testing; 4 | 5 | option java_package = "io.grpc.testing.protobuf"; 6 | option java_outer_classname = "SimpleRecursiveProto"; 7 | option java_multiple_files = true; 8 | 9 | // A simple recursive message for testing purposes 10 | message SimpleRecursiveMessage { 11 | string value = 1; 12 | SimpleRecursiveMessage message = 2; 13 | } 14 | -------------------------------------------------------------------------------- /protobuf/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | 3 | java_library( 4 | name = "protobuf", 5 | srcs = glob([ 6 | "src/main/java/**/*.java", 7 | ]), 8 | visibility = ["//visibility:public"], 9 | deps = [ 10 | "//api", 11 | "//protobuf-lite", 12 | "@com_google_protobuf//:protobuf_java", 13 | artifact("com.google.api.grpc:proto-google-common-protos"), 14 | artifact("com.google.code.findbugs:jsr305"), 15 | artifact("com.google.errorprone:error_prone_annotations"), 16 | artifact("com.google.guava:guava"), 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /protobuf/src/main/java/io/grpc/protobuf/ProtoFileDescriptorSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The 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 | package io.grpc.protobuf; 18 | 19 | import com.google.protobuf.Descriptors.FileDescriptor; 20 | 21 | /** 22 | * Provides access to the underlying proto file descriptor. 23 | * 24 | * @since 1.1.0 25 | */ 26 | public interface ProtoFileDescriptorSupplier { 27 | /** 28 | * Returns file descriptor to the underlying proto file. 29 | */ 30 | FileDescriptor getFileDescriptor(); 31 | } 32 | -------------------------------------------------------------------------------- /protobuf/src/main/java/io/grpc/protobuf/ProtoServiceDescriptorSupplier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | package io.grpc.protobuf; 18 | 19 | import com.google.protobuf.Descriptors.ServiceDescriptor; 20 | 21 | /** 22 | * Provides access to the underlying proto service descriptor. 23 | * 24 | * @since 1.7.0 25 | */ 26 | public interface ProtoServiceDescriptorSupplier extends ProtoFileDescriptorSupplier { 27 | /** 28 | * Returns service descriptor to the proto service. 29 | */ 30 | ServiceDescriptor getServiceDescriptor(); 31 | } 32 | -------------------------------------------------------------------------------- /protobuf/src/main/java/io/grpc/protobuf/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 The 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 | * API for gRPC over Protocol Buffers, including tools for serializing and de-serializing protobuf 19 | * messages. 20 | */ 21 | package io.grpc.protobuf; 22 | -------------------------------------------------------------------------------- /rls/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@rules_jvm_external//:defs.bzl", "artifact") 2 | load("//:java_grpc_library.bzl", "java_grpc_library") 3 | 4 | java_library( 5 | name = "rls", 6 | srcs = glob([ 7 | "src/main/java/io/grpc/rls/*.java", 8 | ]), 9 | visibility = ["//visibility:public"], 10 | deps = [ 11 | ":rls_java_grpc", 12 | "//:auto_value_annotations", 13 | "//api", 14 | "//core", 15 | "//core:internal", 16 | "//stub", 17 | "//util", 18 | "@io_grpc_grpc_proto//:rls_config_java_proto", 19 | "@io_grpc_grpc_proto//:rls_java_proto", 20 | artifact("com.google.auto.value:auto-value-annotations"), 21 | artifact("com.google.code.findbugs:jsr305"), 22 | artifact("com.google.errorprone:error_prone_annotations"), 23 | artifact("com.google.guava:guava"), 24 | ], 25 | ) 26 | 27 | java_grpc_library( 28 | name = "rls_java_grpc", 29 | srcs = ["@io_grpc_grpc_proto//:rls_proto"], 30 | deps = ["@io_grpc_grpc_proto//:rls_java_proto"], 31 | ) 32 | -------------------------------------------------------------------------------- /rls/src/main/java/io/grpc/rls/ResolvedAddressFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc.rls; 18 | 19 | import io.grpc.LoadBalancer.ResolvedAddresses; 20 | 21 | /** A factory to create {@link ResolvedAddresses}. */ 22 | interface ResolvedAddressFactory { 23 | 24 | /** Creates ResolvedAddress with given childLbConfig. */ 25 | ResolvedAddresses create(Object childLbConfig); 26 | } 27 | -------------------------------------------------------------------------------- /rls/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.rls.RlsLoadBalancerProvider 2 | -------------------------------------------------------------------------------- /run-test-client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")" 3 | BIN="./interop-testing/build/install/grpc-interop-testing/bin/test-client" 4 | if [[ ! -e "$BIN" ]]; then 5 | cat >&2 <&2 <All the content under this package and its subpackages are considered annotated with {@link 21 | * io.grpc.Internal}. 22 | */ 23 | @io.grpc.Internal 24 | package io.grpc.xds.internal; 25 | -------------------------------------------------------------------------------- /xds/src/main/java/io/grpc/xds/internal/security/Closeable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The 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 | package io.grpc.xds.internal.security; 18 | 19 | public interface Closeable extends java.io.Closeable { 20 | 21 | @Override 22 | void close(); 23 | } 24 | -------------------------------------------------------------------------------- /xds/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider: -------------------------------------------------------------------------------- 1 | io.grpc.xds.CdsLoadBalancerProvider 2 | io.grpc.xds.PriorityLoadBalancerProvider 3 | io.grpc.xds.WeightedTargetLoadBalancerProvider 4 | io.grpc.xds.ClusterManagerLoadBalancerProvider 5 | io.grpc.xds.ClusterResolverLoadBalancerProvider 6 | io.grpc.xds.ClusterImplLoadBalancerProvider 7 | io.grpc.xds.LeastRequestLoadBalancerProvider 8 | io.grpc.xds.RingHashLoadBalancerProvider 9 | io.grpc.xds.WrrLocalityLoadBalancerProvider 10 | io.grpc.xds.WeightedRoundRobinLoadBalancerProvider 11 | -------------------------------------------------------------------------------- /xds/src/main/resources/META-INF/services/io.grpc.NameResolverProvider: -------------------------------------------------------------------------------- 1 | io.grpc.xds.XdsNameResolverProvider 2 | -------------------------------------------------------------------------------- /xds/src/main/resources/META-INF/services/io.grpc.xds.XdsCredentialsProvider: -------------------------------------------------------------------------------- 1 | io.grpc.xds.internal.GoogleDefaultXdsCredentialsProvider 2 | io.grpc.xds.internal.InsecureXdsCredentialsProvider 3 | io.grpc.xds.internal.TlsXdsCredentialsProvider -------------------------------------------------------------------------------- /xds/third_party/envoy/NOTICE: -------------------------------------------------------------------------------- 1 | Envoy 2 | Copyright The Envoy Project Authors 3 | 4 | Licensed under Apache License 2.0. See LICENSE for terms. 5 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/config/core/v3/event_service_config.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.config.core.v3; 4 | 5 | import "envoy/config/core/v3/grpc_service.proto"; 6 | 7 | import "udpa/annotations/status.proto"; 8 | import "udpa/annotations/versioning.proto"; 9 | import "validate/validate.proto"; 10 | 11 | option java_package = "io.envoyproxy.envoy.config.core.v3"; 12 | option java_outer_classname = "EventServiceConfigProto"; 13 | option java_multiple_files = true; 14 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; 15 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 16 | 17 | // [#not-implemented-hide:] 18 | // Configuration of the event reporting service endpoint. 19 | message EventServiceConfig { 20 | option (udpa.annotations.versioning).previous_message_type = 21 | "envoy.api.v2.core.EventServiceConfig"; 22 | 23 | oneof config_source_specifier { 24 | option (validate.required) = true; 25 | 26 | // Specifies the gRPC service that hosts the event reporting service. 27 | GrpcService grpc_service = 1; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/config/core/v3/socket_cmsg_headers.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.config.core.v3; 4 | 5 | import "google/protobuf/wrappers.proto"; 6 | 7 | import "udpa/annotations/status.proto"; 8 | 9 | option java_package = "io.envoyproxy.envoy.config.core.v3"; 10 | option java_outer_classname = "SocketCmsgHeadersProto"; 11 | option java_multiple_files = true; 12 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; 13 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 14 | 15 | // [#protodoc-title: Socket CMSG headers] 16 | 17 | // Configuration for socket cmsg headers. 18 | // See `:ref:CMSG `_ for further information. 19 | message SocketCmsgHeaders { 20 | // cmsg level. Default is unset. 21 | google.protobuf.UInt32Value level = 1; 22 | 23 | // cmsg type. Default is unset. 24 | google.protobuf.UInt32Value type = 2; 25 | 26 | // Expected size of cmsg value. Default is zero. 27 | uint32 expected_size = 3; 28 | } -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/config/trace/v3/service.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.config.trace.v3; 4 | 5 | import "envoy/config/core/v3/grpc_service.proto"; 6 | 7 | import "udpa/annotations/status.proto"; 8 | import "udpa/annotations/versioning.proto"; 9 | import "validate/validate.proto"; 10 | 11 | option java_package = "io.envoyproxy.envoy.config.trace.v3"; 12 | option java_outer_classname = "ServiceProto"; 13 | option java_multiple_files = true; 14 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; 15 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 16 | 17 | // [#protodoc-title: Trace Service] 18 | 19 | // Configuration structure. 20 | message TraceServiceConfig { 21 | option (udpa.annotations.versioning).previous_message_type = 22 | "envoy.config.trace.v2.TraceServiceConfig"; 23 | 24 | // The upstream gRPC cluster that hosts the metrics service. 25 | core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; 26 | } 27 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.extensions.load_balancing_policies.pick_first.v3; 4 | 5 | import "udpa/annotations/status.proto"; 6 | 7 | option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.pick_first.v3"; 8 | option java_outer_classname = "PickFirstProto"; 9 | option java_multiple_files = true; 10 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3;pick_firstv3"; 11 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 12 | 13 | // [#protodoc-title: Pick First Load Balancing Policy] 14 | // [#not-implemented-hide:] 15 | 16 | // This configuration allows the built-in PICK_FIRST LB policy to be configured 17 | // via the LB policy extension point. 18 | message PickFirst { 19 | // If set to true, instructs the LB policy to shuffle the list of addresses 20 | // received from the name resolver before attempting to connect to them. 21 | bool shuffle_address_list = 1; 22 | } 23 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.extensions.transport_sockets.tls.v3; 4 | 5 | import public "envoy/extensions/transport_sockets/tls/v3/common.proto"; 6 | import public "envoy/extensions/transport_sockets/tls/v3/secret.proto"; 7 | import public "envoy/extensions/transport_sockets/tls/v3/tls.proto"; 8 | 9 | option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; 10 | option java_outer_classname = "CertProto"; 11 | option java_multiple_files = true; 12 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; 13 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/type/matcher/v3/filter_state.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.type.matcher.v3; 4 | 5 | import "envoy/type/matcher/v3/string.proto"; 6 | 7 | import "udpa/annotations/status.proto"; 8 | import "validate/validate.proto"; 9 | 10 | option java_package = "io.envoyproxy.envoy.type.matcher.v3"; 11 | option java_outer_classname = "FilterStateProto"; 12 | option java_multiple_files = true; 13 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; 14 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 15 | 16 | // [#protodoc-title: Filter state matcher] 17 | 18 | // FilterStateMatcher provides a general interface for matching the filter state objects. 19 | message FilterStateMatcher { 20 | // The filter state key to retrieve the object. 21 | string key = 1 [(validate.rules).string = {min_len: 1}]; 22 | 23 | oneof matcher { 24 | option (validate.required) = true; 25 | 26 | // Matches the filter state object as a string value. 27 | StringMatcher string_match = 2; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/type/matcher/v3/node.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.type.matcher.v3; 4 | 5 | import "envoy/type/matcher/v3/string.proto"; 6 | import "envoy/type/matcher/v3/struct.proto"; 7 | 8 | import "udpa/annotations/status.proto"; 9 | import "udpa/annotations/versioning.proto"; 10 | 11 | option java_package = "io.envoyproxy.envoy.type.matcher.v3"; 12 | option java_outer_classname = "NodeProto"; 13 | option java_multiple_files = true; 14 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; 15 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 16 | 17 | // [#protodoc-title: Node matcher] 18 | 19 | // Specifies the way to match a Node. 20 | // The match follows AND semantics. 21 | message NodeMatcher { 22 | option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.NodeMatcher"; 23 | 24 | // Specifies match criteria on the node id. 25 | StringMatcher node_id = 1; 26 | 27 | // Specifies match criteria on the node metadata. 28 | repeated StructMatcher node_metadatas = 2; 29 | } 30 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/type/v3/http.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.type.v3; 4 | 5 | import "udpa/annotations/status.proto"; 6 | 7 | option java_package = "io.envoyproxy.envoy.type.v3"; 8 | option java_outer_classname = "HttpProto"; 9 | option java_multiple_files = true; 10 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; 11 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 12 | 13 | // [#protodoc-title: HTTP] 14 | 15 | enum CodecClientType { 16 | HTTP1 = 0; 17 | 18 | HTTP2 = 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 | HTTP3 = 2; 24 | } 25 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/type/v3/ratelimit_unit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.type.v3; 4 | 5 | import "udpa/annotations/status.proto"; 6 | 7 | option java_package = "io.envoyproxy.envoy.type.v3"; 8 | option java_outer_classname = "RatelimitUnitProto"; 9 | option java_multiple_files = true; 10 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; 11 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 12 | 13 | // [#protodoc-title: Ratelimit Time Unit] 14 | 15 | // Identifies the unit of of time for rate limit. 16 | enum RateLimitUnit { 17 | // The time unit is not known. 18 | UNKNOWN = 0; 19 | 20 | // The time unit representing a second. 21 | SECOND = 1; 22 | 23 | // The time unit representing a minute. 24 | MINUTE = 2; 25 | 26 | // The time unit representing an hour. 27 | HOUR = 3; 28 | 29 | // The time unit representing a day. 30 | DAY = 4; 31 | 32 | // The time unit representing a month. 33 | MONTH = 5; 34 | 35 | // The time unit representing a year. 36 | YEAR = 6; 37 | } 38 | -------------------------------------------------------------------------------- /xds/third_party/envoy/src/main/proto/envoy/type/v3/semantic_version.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package envoy.type.v3; 4 | 5 | import "udpa/annotations/status.proto"; 6 | import "udpa/annotations/versioning.proto"; 7 | 8 | option java_package = "io.envoyproxy.envoy.type.v3"; 9 | option java_outer_classname = "SemanticVersionProto"; 10 | option java_multiple_files = true; 11 | option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; 12 | option (udpa.annotations.file_status).package_version_status = ACTIVE; 13 | 14 | // [#protodoc-title: Semantic version] 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 | message SemanticVersion { 20 | option (udpa.annotations.versioning).previous_message_type = "envoy.type.SemanticVersion"; 21 | 22 | uint32 major_number = 1; 23 | 24 | uint32 minor_number = 2; 25 | 26 | uint32 patch = 3; 27 | } 28 | -------------------------------------------------------------------------------- /xds/third_party/protoc-gen-validate/NOTICE: -------------------------------------------------------------------------------- 1 | protoc-gen-validate 2 | Copyright 2019 Envoy Project Authors 3 | 4 | Licensed under Apache License 2.0. See LICENSE for terms. 5 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/udpa/annotations/sensitive.proto: -------------------------------------------------------------------------------- 1 | // THIS FILE IS DEPRECATED 2 | // Users should instead use the corresponding proto in the xds tree. 3 | // No new changes will be accepted here. 4 | 5 | syntax = "proto3"; 6 | 7 | package udpa.annotations; 8 | 9 | import "google/protobuf/descriptor.proto"; 10 | 11 | option go_package = "github.com/cncf/xds/go/udpa/annotations"; 12 | 13 | extend google.protobuf.FieldOptions { 14 | // Magic number is the 28 most significant bits in the sha256sum of "udpa.annotations.sensitive". 15 | // When set to true, `sensitive` indicates that this field contains sensitive data, such as 16 | // personally identifiable information, passwords, or private keys, and should be redacted for 17 | // display by tools aware of this annotation. Note that that this has no effect on standard 18 | // Protobuf functions such as `TextFormat::PrintToString`. 19 | bool sensitive = 76569463; 20 | } 21 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/udpa/annotations/versioning.proto: -------------------------------------------------------------------------------- 1 | // THIS FILE IS DEPRECATED 2 | // Users should instead use the corresponding proto in the xds tree. 3 | // No new changes will be accepted here. 4 | 5 | syntax = "proto3"; 6 | 7 | package udpa.annotations; 8 | 9 | import "google/protobuf/descriptor.proto"; 10 | 11 | option go_package = "github.com/cncf/xds/go/udpa/annotations"; 12 | 13 | extend google.protobuf.MessageOptions { 14 | // Magic number derived from 0x78 ('x') 0x44 ('D') 0x53 ('S') 15 | VersioningAnnotation versioning = 7881811; 16 | } 17 | 18 | message VersioningAnnotation { 19 | // Track the previous message type. E.g. this message might be 20 | // udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This 21 | // information is consumed by UDPA via proto descriptors. 22 | string previous_message_type = 1; 23 | } 24 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/annotations/v3/security.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.annotations.v3; 4 | 5 | import "xds/annotations/v3/status.proto"; 6 | 7 | import "google/protobuf/descriptor.proto"; 8 | 9 | option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; 10 | 11 | // All annotations in this file are experimental and subject to change. Their 12 | // only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc 13 | // plugin in this repository. 14 | option (xds.annotations.v3.file_status).work_in_progress = true; 15 | 16 | extend google.protobuf.FieldOptions { 17 | // Magic number is the 28 most significant bits in the sha256sum of 18 | // "xds.annotations.v3.security". 19 | FieldSecurityAnnotation security = 99044135; 20 | } 21 | 22 | // These annotations indicate metadata for the purpose of understanding the 23 | // security significance of fields. 24 | message FieldSecurityAnnotation { 25 | // Field should be set in the presence of untrusted downstreams. 26 | bool configure_for_untrusted_downstream = 1; 27 | 28 | // Field should be set in the presence of untrusted upstreams. 29 | bool configure_for_untrusted_upstream = 2; 30 | } 31 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/annotations/v3/sensitive.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.annotations.v3; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; 8 | 9 | extend google.protobuf.FieldOptions { 10 | // Magic number is the 28 most significant bits in the sha256sum of "xds.annotations.v3.sensitive". 11 | // When set to true, `sensitive` indicates that this field contains sensitive data, such as 12 | // personally identifiable information, passwords, or private keys, and should be redacted for 13 | // display by tools aware of this annotation. Note that that this has no effect on standard 14 | // Protobuf functions such as `TextFormat::PrintToString`. 15 | bool sensitive = 61008053; 16 | } 17 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/annotations/v3/versioning.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.annotations.v3; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; 8 | 9 | extend google.protobuf.MessageOptions { 10 | // Magic number is the 28 most significant bits in the sha256sum of 11 | // "xds.annotations.v3.versioning". 12 | VersioningAnnotation versioning = 92389011; 13 | } 14 | 15 | message VersioningAnnotation { 16 | // Track the previous message type. E.g. this message might be 17 | // xds.foo.v3alpha.Foo and it was previously xds.bar.v2.Bar. This 18 | // information is consumed by UDPA via proto descriptors. 19 | string previous_message_type = 1; 20 | } 21 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/core/v3/authority.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.core.v3; 4 | 5 | import "xds/annotations/v3/status.proto"; 6 | 7 | import "validate/validate.proto"; 8 | 9 | option java_outer_classname = "AuthorityProto"; 10 | option java_multiple_files = true; 11 | option java_package = "com.github.xds.core.v3"; 12 | option go_package = "github.com/cncf/xds/go/xds/core/v3"; 13 | 14 | option (xds.annotations.v3.file_status).work_in_progress = true; 15 | 16 | // xDS authority information. 17 | message Authority { 18 | string name = 1 [(validate.rules).string = {min_len: 1}]; 19 | 20 | // .. space reserved for additional authority addressing information, e.g. for 21 | // resource signing, items such as CA trust chain, cert pinning may be added. 22 | } 23 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/core/v3/context_params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.core.v3; 4 | 5 | import "xds/annotations/v3/status.proto"; 6 | 7 | option java_outer_classname = "ContextParamsProto"; 8 | option java_multiple_files = true; 9 | option java_package = "com.github.xds.core.v3"; 10 | option go_package = "github.com/cncf/xds/go/xds/core/v3"; 11 | 12 | option (xds.annotations.v3.file_status).work_in_progress = true; 13 | 14 | // Additional parameters that can be used to select resource variants. These include any 15 | // global context parameters, per-resource type client feature capabilities and per-resource 16 | // type functional attributes. All per-resource type attributes will be `xds.resource.` 17 | // prefixed and some of these are documented below: 18 | // 19 | // `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is 20 | // the listening address of a Listener. Used in a Listener resource query. 21 | message ContextParams { 22 | map params = 1; 23 | } 24 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/core/v3/extension.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.core.v3; 4 | 5 | option java_outer_classname = "ExtensionProto"; 6 | option java_multiple_files = true; 7 | option java_package = "com.github.xds.core.v3"; 8 | option go_package = "github.com/cncf/xds/go/xds/core/v3"; 9 | 10 | import "validate/validate.proto"; 11 | import "google/protobuf/any.proto"; 12 | 13 | // Message type for extension configuration. 14 | message TypedExtensionConfig { 15 | // The name of an extension. This is not used to select the extension, instead 16 | // it serves the role of an opaque identifier. 17 | string name = 1 [(validate.rules).string = {min_len: 1}]; 18 | 19 | // The typed config for the extension. The type URL will be used to identify 20 | // the extension. In the case that the type URL is *xds.type.v3.TypedStruct* 21 | // (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type 22 | // URL of *TypedStruct* will be utilized. See the 23 | // :ref:`extension configuration overview 24 | // ` for further details. 25 | google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; 26 | } 27 | -------------------------------------------------------------------------------- /xds/third_party/xds/src/main/proto/xds/type/matcher/v3/http_inputs.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package xds.type.matcher.v3; 4 | 5 | import "xds/annotations/v3/status.proto"; 6 | 7 | option java_package = "com.github.xds.type.matcher.v3"; 8 | option java_outer_classname = "HttpInputsProto"; 9 | option java_multiple_files = true; 10 | option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; 11 | 12 | option (xds.annotations.v3.file_status).work_in_progress = true; 13 | 14 | // [#protodoc-title: Common HTTP Inputs] 15 | 16 | // Specifies that matching should be performed on the set of :ref:`HTTP attributes 17 | // `. 18 | // 19 | // The attributes will be exposed via `Common Expression Language 20 | // `_ runtime to associated CEL matcher. 21 | // 22 | // Refer to :ref:`Unified Matcher API ` documentation 23 | // for usage details. 24 | // 25 | // [#comment:TODO(sergiitk): When implemented, add the extension tag.] 26 | message HttpAttributesCelMatchInput { 27 | } 28 | -------------------------------------------------------------------------------- /xds/third_party/zero-allocation-hashing/NOTICE: -------------------------------------------------------------------------------- 1 | zero-allocation-hashing 2 | Copyright 2015 Higher Frequency Trading http://www.higherfrequencytrading.com 3 | 4 | Licensed under Apache License 2.0. See LICENSE for terms. 5 | --------------------------------------------------------------------------------