15 Commits

Author SHA1 Message Date
4748a040c8 balancer: provide parsed target through BuildOptions (#2803) 2019-05-09 13:27:41 -07:00
597a4aa027 grpc: remove excess new line from the log statement (#2766) 2019-04-11 14:31:07 -07:00
8e6533ee6e client: clean up v1 balancer wrapper error handling (#2511) 2019-01-30 10:56:23 -08:00
4be7750b61 plumb lastConn error in v1 balancer (#2508) 2018-12-07 09:12:49 -08:00
04ea82009c cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
4344c204c9 Split grpclb out of top level grpc package (#2107)
This PR splits out grpclb from grpc.  I have made the PR in several commits so you can see more clearly the steps that happened.

There are a few possibly contentious points that I would like to make clear up front:

* grpclb will no longer autoload as a load balancer.  I think this is okay, as service config is not widely (at all?) used, and I believe this is the only way to access it.
* `internal` is used more, as a way of having code shared between packages without exposing types
* ConnectivityStateEvaluator, as used by grpclb, is no longer thread safe.  I believe there is an outer mutex that guards access, but I want to point out this subtle change up here.

All but one tests pass with this, due to another cyclic dependency.  I can fix this, but it is a little more widely scoped (such as exposing grpc.server and grpc.errorDesc in the internal package).   This PR is a nearly-passing sample of that last step to get this working. 

PTAL @menghanl @dfawley
2018-06-05 09:54:12 -07:00
95bbf69653 Remove redundant return statements (gosimple)
This fixes:
balancer/base/balancer.go:149:2: redundant return statement (S1023)
balancer_v1_wrapper.go:260:2: redundant return statement (S1023)
balancer_v1_wrapper.go:273:2: redundant return statement (S1023)
balancer_v1_wrapper.go:285:2: redundant return statement (S1023)
benchmark/benchmark.go:68:2: redundant return statement (S1023)
clientconn.go:1461:2: redundant return statement (S1023)
grpclb.go:223:2: redundant return statement (S1023)
grpclb.go:260:2: redundant return statement (S1023)
grpclb_util.go:201:2: redundant return statement (S1023)
rpc_util.go:278:50: redundant return statement (S1023)
rpc_util.go:296:56: redundant return statement (S1023)
rpc_util.go:314:56: redundant return statement (S1023)
rpc_util.go:333:53: redundant return statement (S1023)
rpc_util.go:354:52: redundant return statement (S1023)
rpc_util.go:387:56: redundant return statement (S1023)
rpc_util.go:416:53: redundant return statement (S1023)
stream.go:651:2: redundant return statement (S1023)
2018-04-15 12:43:34 +02:00
4e393e0b21 grpc: fix deprecation comments to conform to standard (#1691) 2017-12-18 09:23:42 -08:00
5ff10c3b65 fix flaky TestPickfirstOneAddressRemoval (#1731) 2017-12-14 15:42:58 -08:00
33ee217d11 balancer: reduce chattiness (#1608)
Remove some log messages from balancer_conn_wrappers and
balancer_v1_wrapper which seem to be indented for debugging (one of them
was even logging a pointer address).

They can produce a lot of log messages which don't add value in a normal
scenario.
2017-10-25 11:01:53 -07:00
a353537ff5 Register and use default balancers and resolvers (#1551) 2017-10-19 11:32:06 -07:00
83acb05607 fix typo and lint (#1553) 2017-10-02 17:29:22 -07:00
4bbdf230d7 New implementation of roundrobin and pickfirst (#1506) 2017-10-02 09:22:57 -07:00
4bbe223b12 remove a debug print that causes deadlock (#1505) 2017-09-05 11:07:52 -07:00
8233e124e4 Add new Resolver and Balancer APIs (gRFC L9) (#1408)
- Add package balancer and resolver.
 - Change ClientConn internals to new APIs and adds a wrapper for v1 balancer.
2017-08-31 10:59:09 -07:00