forked from hudl/fargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve whether an instance's ports are enabled
When transcribing the fargo.Instance struct to and from both JSON and XML, indicate and retain whether each port is enabled or not. Note that in the Java Eureka library, by default the insecure port is enabled and the secure port is disabled. Here the zero value of a fargo.Instance has the insecure port disabled as well. While it would be possible to invert the sense of the corresponding field to indicate whether the insecure port is disabled, so that the zero value of false matches the Java library's behavior, the resulting asymmetry with the secure port's field is too awkward. Instead, require registrants to enable the ports explicitly. This change removes the exported fargo.Port type and several exported fields of the fargo.Instance type: XMLName PortJ SecurePortJ None of these were exposed deliberately for use by callers; they were all exposed only as accidental consequences of the JSON and XML marshalling library's idiosyncrasies.
- Loading branch information
Showing
4 changed files
with
262 additions
and
44 deletions.
There are no files selected for viewing
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