-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Make services information displayed with ockam node create | show
command more dynamic.
#3177
Comments
ockam node create | show
command more dynamic.
ockam node create | show
command more dynamic.ockam node create | show
command more dynamic.
What does dynamic means here? struct NodeOutput(String);
impl NodeOutput {
fn new() -> NodeOutput {
NodeOutput(String::new())
}
fn name(mut self, name: &str) -> Self {
let name = format!("Node name: {}\n", name);
self.0.push_str(&name);
self
}
fn build(self) -> String {
self.0
}
}
fn main() {
let nodeoutput = NodeOutput::new()
.name("service one")
.name("service two")
.build();
println!("{:?}", nodeoutput);
} *memory allocations can be improved |
Thank you for looking into this.
I meant to say that, this list displayed here is populated from what is in the registry. So as we add new services they are all displayed. Instead of this hardcoded output. ockam/implementations/rust/ockam/ockam_command/src/node/show.rs Lines 39 to 61 in f12c604
Your output sketch looks good. |
Alright then, I would create a PR based on the sketch in |
Hey @mrinalwadhwa, what is the scope of this issue? Should it be limited to |
@anuvratsingh I suggest we keep this issue decoupled from the bigger refactor in #3241. This one can just be about the output. What you have in #3223 seems close enough to land. I think another interesting piece of this is getting the list of services from the node api. |
After #3176
ockam node create
displays:This is also displayed on
node show
andnode list
A part of this info is currently hardcoded so various demos become more easy to understand for new users:
https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/node/show.rs#L66-L88
and roughly maps to services started here
https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_api/src/nodes/service.rs#L186-L215
This information would be incomplete after someone run commands like
ockam secure-channel-listener create
orockam tcp-listener create
.We should make this a dynamically generated list of services.
This is also related to the
ockam service
subcommand that @SanjoDeundiak started developing herehttps://github.com/build-trust/ockam/tree/develop/implementations/rust/ockam/ockam_command/src/service
We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted
The text was updated successfully, but these errors were encountered: