Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: configurable ListenAndServe address, fixes #405 #406

Merged
merged 1 commit into from
Jul 13, 2020
Merged

feat: configurable ListenAndServe address, fixes #405 #406

merged 1 commit into from
Jul 13, 2020

Conversation

charles-knox-intel
Copy link
Contributor

@charles-knox-intel charles-knox-intel commented Jul 13, 2020

Signed-off-by: charles-knox-intel [email protected]

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

The ListenAndServe internal API calls to start the app functions SDK web server currently only listen on :<port>, which prevents developers from using the SDK in various environments that may not allow for binding on the 0.0.0.0 interface.

Issue Number: #405

What is the new behavior?

A new configurable option called ServerBindAddr has been added, similar to edgexfoundry/go-mod-bootstrap#84 and edgexfoundry/go-mod-bootstrap#83. If ServerBindAddr is not specified, app-functions-sdk-go will instead use the Host value from the service's configuration. If neither are defined, then the value will be :<port>, which is how it was previously, resulting in ListenAndServe being called on the 0.0.0.0 interface.

Does this PR introduce a breaking change?

  • Yes
  • No

Are there any new imports or modules? If so, what are they used for and why?

No

Are there any specific instructions or things that should be known prior to reviewing?

No

Other information

@charles-knox-intel charles-knox-intel marked this pull request as ready for review July 13, 2020 22:13
@lenny-goodell
Copy link
Member

@charles-knox-intel , please use feat rather than fix as this isn't a bug, but a better way to handle this. THX

@charles-knox-intel charles-knox-intel changed the title fix: configurable ListenAndServe address, fixes #405 feat: configurable ListenAndServe address, fixes #405 Jul 13, 2020
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@charles-knox-intel
Copy link
Contributor Author

@lenny-intel Thanks for the feedback, will do in the future! Commit has been updated

@lenny-goodell lenny-goodell merged commit e8b2565 into edgexfoundry:master Jul 13, 2020
@charles-knox-intel charles-knox-intel deleted the config-listenandserve branch July 14, 2020 16:06
lenny-goodell pushed a commit that referenced this pull request Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants