-
Notifications
You must be signed in to change notification settings - Fork 6
Add crate gwname to set gateway name #1126
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
Merged
Merged
Conversation
This file contains hidden or 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
daniel-noland
requested changes
Dec 11, 2025
Collaborator
daniel-noland
left a comment
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.
I think I must have missed something. We should chat about this
e96d3c0 to
2793536
Compare
f8ccdfc to
6de9d4b
Compare
3e5f0b3 to
52aee41
Compare
mvachhar
approved these changes
Dec 16, 2025
Adds a tiny crate to set the gateway name in a static variable that can be set only once. The name will be set either from the cmd line arguments or by retrieving the hostname from the OS. Signed-off-by: Fredi Raspall <[email protected]>
The argument, currently optional, will allow setting the name of the gateway. Signed-off-by: Fredi Raspall <[email protected]>
Augment LaunchConfiguration with GeneralConfigSection that may include general, global settings. Signed-off-by: Fredi Raspall <[email protected]>
Set the gateway name from the cmd line --name argument. If no --name is provided, set the gateway name from the hostname provided by the OS. Fail to start if the gatway name cannot be set. With this, the gateway name defaults to the hostname but can always be overriden with --name. Signed-off-by: Fredi Raspall <[email protected]>
Signed-off-by: Fredi Raspall <[email protected]>
Adds a fixture so that we can annotate tests such that
we make sure that the gateway name is seen as set from
those tests. Sample:
#[test]
#[wrap(with_gw_name())]
fn test_potato() {
let gw_name = get_gw_name().unwrap();
println!("Hello {gw_name}");
}
This is Daniel's.
Signed-off-by: Fredi Raspall <[email protected]>
Signed-off-by: Fredi Raspall <[email protected]>
bcccd52 to
7ac3866
Compare
daniel-noland
approved these changes
Dec 16, 2025
Collaborator
daniel-noland
left a comment
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.
approved after offline chat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR: