17 Commits

Author SHA1 Message Date
4bbdf230d7 New implementation of roundrobin and pickfirst (#1506) 2017-10-02 09:22:57 -07:00
35170916ff Fix deadline error on grpclb streams (#1511) 2017-09-14 15:03:22 -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
e696c3d4da Remove expiration_interval from grpclb message (#1477) 2017-08-28 10:30:49 -07:00
e98913eca1 fix grpclb protos to not cause re-registration of types (#1466) 2017-08-25 13:32:10 -07:00
25b4a426b4 go-generate pb.go files and check in Travis to make sure they don't change (#1426) 2017-08-17 16:00:51 -07:00
a56843968d DNS resolver (#1300)
* initial dns resolver impl

* add srv lookup

* more srv

* change from string to Update

* added port handling

* a complete draft for dns resovler except the polling mechanism

* added sleep to infrequently poll the DNS server

* commented out test case since they are not portable

* remove duplicate declaration/definition in grpclb

* change namespace for grpclb structures

* goimports gofmt

* fix sorting issue

* implement sort.Interface

* different sort implementation for different go version

* add missing files

* fix missing comments

* handle err

* fix comments: unexport dnsResolver and dnsWatcher, add chan to exit Next(), add freq to control polling frequency

* enhance target string handling, add static IPWatcher, add mock test

* debug travis

* disable real address resolver test, since travis return 3 resolved IPs, 2 of them are duplicates

* shorten test time by reduce sleep time in TestIPWatcher, since it doesn't really do the DNS round trip

* resolve data race

* resolve data race using waitgroup

* reimplement setHostPort, compileUpdate, unexport ipWatcher

* delete sort related stuff, fix close bug for Next(), fix compileUpdate bug(change to map[Update]bool, plus fix minor review comments

* fix minor test case

* minor change to Next()

* use net.DefaultResolver with context as input

* add different build rules for lookupHost and lookupSRV

* minor fix

* go1.6 shall fail, but 1.7, 1.8 should pass

* go1.6 is expected to pass

* all go version should pass, added pre17 and 17 for replaceNetFunc to handle context problem

* rename test helper file name. should fix build problem

* goimports

* fix 1.7 context problem

* reformat dns_resolver_test structures

* change Next() behavior to have equal stalling interval between each lookup. Restructure dns_resolver_test.

* gofmt

* update go17_test.go, go18_test.go to reuse code. dns_resolver_test: check result and behavior correctness separately.

* update Next() logic
2017-07-24 17:17:45 -07:00
d6723916d2 Use log severity and verbosity level (#1340)
- All logs use 1 severity level instead of printf
 - All transport logs only go to verbose level 2+
 - The default logger only log errors and verbosity level 1
 - Add environment variable GRPC_GO_LOG_SEVERITY_LEVEL and GRPC_GO_LOG_VERBOSITY_LEVEL to set severity or verbosity levels for the default logger
2017-07-13 12:10:19 -07:00
1ab4adf22d Support ipv6 addresses in grpclb (#1303)
Add square brackets to ipv6 addresses, otherwise net.Dial() and
net.SplitHostPort() will return too many colons error.
2017-06-13 13:43:09 -07:00
ddbf6c46a6 autofix license notice 2017-06-08 14:42:19 +02:00
c7379be7b6 grpclb balancer.Close() should not panic if called more than once (#1250) 2017-05-19 15:44:37 -07:00
780308da60 add logs to grpclb on send and recv (#1235) 2017-05-12 14:05:32 -07:00
07bd9434fa Pass custom dialer to balancer (#1205)
* Pass custom dialer to balancer
* add test for passing custom dialer
* add grpclb package comment
2017-05-11 10:10:19 -07:00
a40b8d44e0 Address the comments 2017-05-04 16:29:17 -07:00
7ddf89f9b7 Fix doc 2017-05-04 10:30:28 -07:00
277e90a432 Client load report for grpclb. (#1200) 2017-04-27 10:43:38 -07:00
c73e0165df Update grpclb proto and move grpclb into package grpc (#1186) 2017-04-25 10:51:43 -07:00