Commit Graph

4 Commits

Author SHA1 Message Date
Kun Zhang 97b926391b context: add the four-value withValues(). (#2506) 2016-12-13 14:03:23 -08:00
Eric Anderson cfb6bd0fe2 context: Fix ErrorProne ClassNewInstance
http://errorprone.info/bugpattern/ClassNewInstance
2016-12-08 10:33:31 -08:00
Kun Zhang 84862867f7 context: pluggable Storage mechanism. (#2461)
Currently Context propagate in-thread by its own ThreadLocal, and
cross-thread propagation must be done with the mechanisms provied by
gRPC Context.  However, there are frameworks (e.g. what we are using
inside Google) which have already established context-propagation
mechanisms.  If gRPC Context may ride on top of them, it would be
propagated automatically without additional effort from the application.

The Storage API allows gRPC Context to be attached to anything.  The
default implementation still uses its own ThreadLocal.  If an override
implementation is present, gRPC Context will use it.
2016-12-02 09:47:58 -08:00
Kun Zhang c4f7f5c4fd core: split Context into a separate grpc-context artifact.
The Context API is not particularly gRPC-specific, and will be used by
Census as its context propagation mechanism.

Removed all dependencies to make it easy for other libraries to depend
on.
2016-09-02 13:18:35 -07:00