* add keepalive params to the alts handshaker client dial option
* no need to permit without stream
* address comment
* add env var protection
* go vet
* Read max number of concurrent ALTS handshakes from environment variable.
* Refactor to use new envconfig file.
* Remove impossible if condition in acquire().
* Use weighted semaphore.
* Add e2e test for concurrent ALTS handshakes.
* Separate into client and server semaphores.
* Use TryAcquire instead of Acquire.
* Attempt to fix go.sum error.
* Run go mod tidy compat=1.17.
* Update go.mod for examples subdirectory.
* Run go mod tidy -compat=1.17 on examples subdirectory.
* Update go.mod in subdirectories.
* Update go.mod in security/advancedtls/examples.
* Missed another go.mod update.
* Do not upgrade glog because it requires Golang 1.19.
* Fix glog version in examples/go.sum.
* More glog cleanup.
* Fix glog issue in gcp/observability/go.sum.
* Move ALTS env var into envconfig.go.
* Fix go.mod files.
* Revert go.sum files.
* Revert interop/observability/go.mod change.
* Run go mod tidy -compat=1.17 on examples/.
* Run gofmt.
* Add comment describing test init function.
This removes RequireHandshakeHybrid support and changes the default behavior
to RequireHandshakeOn. Dial calls will now block and wait for a successful
handshake before proceeding. Users relying on the old hybrid behavior (cmux
users) should consult https://github.com/soheilhy/cmux/issues/64.
Also, several tests have been updated to take this into consideration by
sending settings frames.
6cc789b34b made `envconfig.RequireHandshakeOn` the default when unspecified by environment variable, but missed a fallthrough leading to `GRPC_GO_REQUIRE_HANDSHAKE=on` specifying `envconfig.RequireHandshakeHybrid`. This change adds the missing fallthrough.
Previously, the transport was able to reset via the retry loop,
or via the event closures calling resetTransport. This meant
a very large amount of synchronization was necessary: one
reset meant the other had to not reset; state had to be kept
at the addrconn; and very subtle interactions were hard to
reason about.
This change removes the ability for event closures to directly
reset the transport. Instead, they signal to to the retry
loop about the event, and the retry loop is always the single
place that retries occur.
This also allows us to refactor the address switching logic
into a much simpler for loop inside the retry loop instead of
using addrConn state to keep track of an index.
Possible settings of this environment variable:
- "hybrid" (default; removed after the 1.17 release): do not wait for handshake before considering a connection ready, but wait before considering successful.
- "on" (default after the 1.17 release): wait for handshake before considering a connection ready/successful.
- "off": do not wait for handshake before considering a connection ready/successful.
This setting will be completely removed after the 1.18 release, and "on" will be the only supported behavior.