Commit Graph

295 Commits

Author SHA1 Message Date
zpencer f8c7f963ef
core,netty,okhttp: use ServiceProviders for ManagedChannelProvider, ServerProvider (#4047) 2018-02-08 08:57:52 -08:00
Eric Gribkoff 722d6f0bea
okhttp: support Conscrypt security provider 2018-01-31 10:45:27 -08:00
zpencer 199a5203c5
core: move ChannelStats and TransportStats to io.grpc.internal.Channelz (#4008) 2018-01-25 23:24:49 -08:00
zpencer b109595ad3
core: move Instrumented, LogId, WithLogId to io.grpc.internal as public (#3995) 2018-01-25 17:19:00 -08:00
Eric Anderson 4bc0c95d0b Update ErrorProne to 2.1.3 and fix failures
The fixes could have subtle side-effects, but I did take care when making them.
2018-01-09 12:40:55 -08:00
Eric Anderson 35a6bf863d Enable the Guava Beta Checker 2018-01-08 14:52:51 -08:00
zpencer f1151f91b9
core: InternalInstrumented<T> for instrumented classes (#3817)
Entities that report stats to channelz will implement this interface.
2017-12-13 12:56:25 -08:00
zpencer b6f556c088
core,okhttp: bump census to 0.10.0 which should fix GAE issue (#3833) 2017-12-08 11:30:52 -08:00
zpencer 2b3885bbc2
core,okhttp: add TransportTracer to okhttpclient (#3809) 2017-12-07 17:12:08 -08:00
Carl Mastrangelo c9b02db276
all: add Status messages to all statuses 2017-12-04 19:00:16 -08:00
zpencer 9e7a4c44be
core: move WithLog and LogId to io.grpc (#3813)
The channelz service must not live in io.grpc.internal, and channelz
needs to be able to get the identifier of the entities it
tracks. Since io.grpc can not refer to io.grpc.internal, the LogId
must be moved out of internal.
2017-11-30 15:04:40 -08:00
zpencer 25cd0be24c
core,netty,okhttp: move TransportTracer.Stats to io.grpc (#3812)
io.grpc can not refer to io.grpc.internal so this needs to be moved
out.
2017-11-30 13:01:58 -08:00
Eric Gribkoff 4d35ea05c4
core,okhttp: handle unresolved proxy addresses 2017-11-23 11:00:09 -08:00
kenji yoshida 4db323c5c4 all: fix grammar typos in javadocs 2017-11-22 18:00:51 -08:00
zpencer 51bbc1a4bd
okhttp: make outbound window size readable (#3727) 2017-11-13 14:31:15 -08:00
zpencer 12df89b062
okhttp: disable census when in GAE+JDK7 (#3696)
Disable census for now due to:
https://github.com/census-instrumentation/opencensus-java/issues/777
2017-11-13 10:16:06 -08:00
ramaraochavali 17e1ad9bb2 core: Add useTransportSecurity to ManagedChannelBuilder
This allows the consumer of a builder to swap back from plaintext.
2017-11-10 10:57:05 -08:00
Eric Anderson bbb98feb75 Fix broken method names in tests that include leading '/'
The method name passed to MethodDescriptor does not include the leading
'/'. If it does, on the wire it will actually cause two slashes. This
has been this way for a _long_ time, but in tests that ignore the method
name or use the same MethodDescriptor no client and server the extra /
"works fine." But it's misleading, so let's remove it.
2017-11-08 15:24:50 -08:00
zpencer a3c44fa7ca
core,netty,okhttp: add TransportTracer param to ClientStream and Http2ClientStreamTransportState (#3668)
This diff does not actually change any behaviors yet, that will come
in the next diff along with unit tests for those new behaviors. This
diff's goal is only to change the method signatures so future diffs
are cleaner.
2017-11-07 16:08:55 -08:00
zpencer a2e9a7f6dd
core,ntety,okhttp: Add getTransportStats method to ClientTransport (#3662)
This merely adds the method but does not do anything yet.
2017-11-06 13:24:20 -08:00
zpencer 9fac15d4f8
core,netty,okhttp: move transport tracer outbound counters to transport thread (#3661)
Counters are bumped when a message is completely written. If a
part of a message is still buffered and not yet flushed, we will
not increment the stats.
2017-11-06 12:46:17 -08:00
Eric Anderson f9f603570d Allow tests to run on IPv6-less machines
Our Travis-CI builds are failing with "Protocol family unavailable" due
to the usage of ::1. Although it's 2017 and we'd expect to have ipv6
_loopback_ anywhere that mattered, apparently that's not the case.

The tests now work equally well on IPv4-only and IPv6-only machines.
2017-11-02 13:32:34 -07:00
Eric Anderson 698ba803d5 Move ProxyDetectorImplTest to core.
It should never have been in okhttp.
2017-10-20 13:49:54 -07:00
zpencer 7df9ae9753 core,netty,okhttp: detect proxy via ProxySelector (#3021)
This lets us specify the proxy using `-Dhttps.proxyHost=host -Dhttps.proxyPort=port`
along with auth info like username and password.
2017-10-17 19:26:11 -07:00
Kun Zhang 8edead0851 core: make in-process transport support StreamTracer
This is needed for both completeness and stats/tracing contexts propagation.

Stats recording with Census is intentionally disabled (#2284), while the rest of the Census-related logic work the same as on the other transports.
2017-10-09 10:14:36 -07:00
Carl Mastrangelo 5e36a8deb5 all: upgrade to JUnit 4.12 2017-10-05 11:24:15 -07:00
Eric Anderson e92b72588d Promote keepalive to ManagedChannelBuilder; stabilize
Fixes #3493
2017-09-27 11:59:04 -07:00
Kun Zhang a9941a8bcf okhttp/test: add missing annotation. (#3476) 2017-09-18 15:35:18 -07:00
zpencer 2b1363d586 core,netty,okhttp,protobuf-lite: avoid @Beta guava classes (#3463) 2017-09-14 19:39:06 -07:00
zpencer bb203657cb okhttp: update caller of Headers.createRequestHeaders (#3465) 2017-09-14 17:19:36 -07:00
zpencer bda67784c0 core,netty,okhttp: strip outbound headers with reserved names (#3098)
These will be stripped:
CONTENT_TYPE, TE, USER_AGENT
2017-09-14 15:26:36 -07:00
Eric Gribkoff ec600feb87 okhttp: set GET method in headers (#3316) 2017-09-11 13:58:33 -07:00
Carl Mastrangelo c024f17429 netty,okhttp: include more detail about ALPN missing
Additionally: include info on why android classes are missing
2017-08-24 16:00:36 -07:00
Kun Zhang 41410345e6 core: pass status to ManagedClientTransport.shutdown() (#3351)
This aligns with shutdownNow(), which is already accepting a status.
The status will be propagated to application when RPCs failed because
of transport shutdown, which will become useful information for debug.
2017-08-16 10:23:07 -07:00
ZHANG Dapeng c71e2919de all: fix typo of overridden
s/overriden/overridden/g
2017-08-11 16:53:53 -07:00
Eric Gribkoff 9b74f8e756 core,netty,okhttp: add option to deframe in app thread 2017-08-11 16:52:45 -07:00
Eric Gribkoff 16575d01a3 core,netty,okhttp,testing: switch to StreamListener.messagesAvailable 2017-08-11 16:52:45 -07:00
Paul Gross 72b9ee22b8 all: Fix mismatch in naming Bazel Maven jars
This commit aligns the naming of the Bazel Maven jars with the names
used by Bazel's migration-tooling project:

https://github.com/bazelbuild/migration-tooling

Unfortunately, we can't fix @com_google_protobuf_java because it's
required by Bazel itself.

Fixes #3328
2017-08-11 16:39:43 -07:00
Eric Anderson c392a91a99 okhttp: Make Headers package-private
There was no way to use it without touching internal APIs, and it should
never have been public to begin with as it serves no purpose to a user.
2017-08-10 14:25:16 -07:00
Eric Anderson bd743f3afd core: Channel uses transport's ScheduledExecutorService
Coupled with the similar change on server-side, this removes the need for a
thread when using Netty. For InProcess and OkHttp, it would allow us to let the
user to provide the scheduler for tests or application-wide thread sharing.
2017-07-25 14:26:16 -07:00
ZHANG Dapeng 883a85ee93 core,netty,okhttp: remove 2-arg ClientTransport.newStream()
to keep only one `newStream()` method in the `ClientTransport` interface
2017-07-25 14:12:36 -07:00
Eric Anderson d325919f62 core: Use Class.forName(String) in provider for Android
Class.forName(String) is understood by ProGuard, removing the need for
manual ProGuard configuration and allows ProGuard to rename the provider
classes. Previously the provider classes could not be renamed.

Fixes #2633
2017-07-19 10:15:03 -07:00
Ian Haken 677c84e1d4 okhttp: Add support for specifying a custom hostname verifier when using on OkHttpChannelBuilder. 2017-07-14 16:04:15 -07:00
Eric Anderson cbad906c0e Update to Error Prone 2.0.21 2017-07-07 10:30:14 -07:00
Eric Anderson c436561fc5 all: Use fixed version number for java 6/7 signatures
This is important for stable builds, as if the signature changes the old source
may no longer validate.
2017-06-30 15:25:34 -07:00
Simon Horlick 6d9e149dcb build: Add Bazel java_grpc_library rule
Bazel third party dependencies are specified in repositories.bzl which
gives the consumer the ability to opt-out of any dependencies they use
directly in their own project.

Fixes #2756
2017-06-22 13:06:49 -07:00
Carl Mastrangelo 6ef77e0609 core: hide access to Status code and message keys 2017-06-08 10:16:06 -07:00
Carl Mastrangelo 166108a943 all: fix licence whitespace 2017-06-01 14:28:37 -07:00
Carl Mastrangelo 3bfd630bff all: update to Apache 2 licence
Also, update the authors.
2017-05-31 13:29:01 -07:00
Eric Gribkoff f52b4c1443 okhttp: ignore unknown HTTP/2 settings 2017-05-30 09:23:53 -07:00