This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Periodically re-resolve UDP server address, with opt-out (#520)
* Add resolved udp connection type, continually resolve dns names in background Signed-off-by: Trevor Foster <[email protected]> * Be sure to set buffer bytes width on new connections. Signed-off-by: Trevor Foster <[email protected]> * Lock when checking if resolved addr is new. Signed-off-by: Trevor Foster <[email protected]> * Fixes from review comments. Dont return error if UDPConn fails on startup Signed-off-by: Trevor Foster <[email protected]> * Fix failing test. Apparently the linux kernel returns the sockopt val doubled. Signed-off-by: Trevor Foster <[email protected]> * Use atomic ops to manage bufferBytes instead of locking mutex Signed-off-by: Trevor Foster <[email protected]> * Fix buffer bytes assert because sock opt value is not guaranteed to be exactly twice set val Signed-off-by: Trevor Foster <[email protected]> * Remove intermediate init helpers, initialize close chann in struct initialization Signed-off-by: Trevor Foster <[email protected]> * Fixes based on comments, more tests for udp_client.go, and test for write retry Signed-off-by: Trevor Foster <[email protected]> * Run make fmt Signed-off-by: Trevor Foster <[email protected]> * Remove unused struct field Signed-off-by: Trevor Foster <[email protected]> * Fix lint error Signed-off-by: Trevor Foster <[email protected]> * Add test for new conn established when host record changes Signed-off-by: Trevor Foster <[email protected]> * Fix comment typo Signed-off-by: Trevor Foster <[email protected]> * Add test for failed write retry Signed-off-by: Trevor Foster <[email protected]> * Add test calling NewAgentClientUDP Signed-off-by: Trevor Foster <[email protected]> * Remove sleep on last try evaluating connection condition Signed-off-by: Trevor Foster <[email protected]> * Rename resolved udp conn to reconnecting udp conn, add opt-out option for reconnecting client and option for reconnect interval Signed-off-by: Trevor Foster <[email protected]> * Remove irrelevant comment, fix transport max packet size regression Signed-off-by: Trevor Foster <[email protected]> * Add panic in case the test server listen or srv fails unexpectedly Signed-off-by: Trevor Foster <[email protected]> * Add coverage for new env vars Signed-off-by: Trevor Foster <[email protected]> * Run make fmt Signed-off-by: Trevor Foster <[email protected]> * Add back constants, add helper for generating a mock udp addr, require all assertions of udp write to succeed Signed-off-by: Trevor Foster <[email protected]> * Remove local agent constants from utils Signed-off-by: Trevor Foster <[email protected]> * Move no error requirement into mock udp addr constructor Signed-off-by: Trevor Foster <[email protected]>
- Loading branch information
Showing
11 changed files
with
1,023 additions
and
54 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.