* 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
- 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
If it's not client streaming, we should already have the request to be sent,
so we don't flush the header.
If it's client streaming, the user may never send a request or send it any
time soon, so we ask the transport to flush the header.
And flush header even without metadata