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

Refactor NodeManager constructor #3527

Closed
SanjoDeundiak opened this issue Sep 26, 2022 · 2 comments · Fixed by #3551
Closed

Refactor NodeManager constructor #3527

SanjoDeundiak opened this issue Sep 26, 2022 · 2 comments · Fixed by #3551

Comments

@SanjoDeundiak
Copy link
Member

SanjoDeundiak commented Sep 26, 2022

Currently NodeManager::create function takes 10 arguments. It's time to move those arguments into into one or few structures

impl NodeManager {
/// Create a new NodeManager with the node name from the ockam CLI
#[allow(clippy::too_many_arguments)]
pub async fn create(
ctx: &Context,
node_name: String,
node_dir: PathBuf,
// Should be passed only when creating fresh node and we want it to get default root Identity
identity_override: Option<IdentityOverride>,
skip_defaults: bool,
enable_credential_checks: bool,
ac: Option<&AuthoritiesConfig>,
project_id: Option<Vec<u8>>,
api_transport: (TransportType, TransportMode, String),
tcp_transport: TcpTransport,
) -> Result<Self> {


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

@vncsalencar
Copy link
Contributor

Hi, @SanjoDeundiak. Do you think this is a good-first-issue candidate? I'd like to give this a go if so.

@mrinalwadhwa
Copy link
Member

@vncsalencar I think so. Go ahead an give it a try, if you get stuck, please don't hesitate to ask questions, we're here to help.

@adrianbenavides adrianbenavides added the hacktoberfest Apply to issues you want contributors to help with label Oct 3, 2022
@mergify mergify bot closed this as completed in #3551 Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants