-
Notifications
You must be signed in to change notification settings - Fork 17
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
Stream constructor uses the DEFLECT_ID and DEFLECT_HOST ENV_VARs #98
Conversation
* @param host The address of the target Server instance. It can be a | ||
* hostname like "localhost" or an IP in string format like | ||
* "192.168.1.83". If set, the environment variable DEFLECT_HOST | ||
* takes precedence over the given value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the precedence. Let's say a UI allows the user to enter host+port to connect to - know the app has now way of ensuring that this user-provided values are used. Imo the typical use case is that env variables provide defaults, overridable by command line args, overridable by GUI (cf. $DISPLAY, '--display' usage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a fair point. @tribal-tec argued the other way around, that ENV variables should be able to override runtime behaviour without recompiling. Maybe command line arguments should still be able to take precedence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo the default (env, argv) construction should have a different ctor. zeroeq::http::Server has the create() factory method which may return a nullptr - arguably not the most elegant way. The alternative proposed by @tribal-tec was to have the ctor throw if no entity is desired, but this requires the callee to catch - also not great.
ab46d69
to
0e2eb25
Compare
Updated with precedence for the programmatic arguments |
+1 for me |
Change Deflect streaming activation, according to BlueBrain/Deflect#98
No description provided.