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

Move JDC initialization from main to lib #992

Closed
jbesraa opened this issue Jun 21, 2024 · 4 comments
Closed

Move JDC initialization from main to lib #992

jbesraa opened this issue Jun 21, 2024 · 4 comments
Labels
job-declarator-client refactor Implies refactoring code

Comments

@jbesraa
Copy link
Contributor

jbesraa commented Jun 21, 2024

I am trying to write some tests running the whole flow, and noticed that JDC initialization is happening inside main.rs rather than lib.rs which makes it not very modular. I propose to move the initialization to lib so it could be exported and used in different context, like testing

@Fi3
Copy link
Collaborator

Fi3 commented Jun 24, 2024

whatever function will end up initializing the role should take async streams of messages not addresses

@jbesraa
Copy link
Contributor Author

jbesraa commented Jun 24, 2024

@Fi3 Could you please comment here #993 with a bit more details?

@rrybarczyk rrybarczyk added refactor Implies refactoring code job-declarator-client labels Jun 24, 2024
@Fi3
Copy link
Collaborator

Fi3 commented Jun 25, 2024

It was just a generic comment about make it more modular. Instead of open the socket on initialization, passing a stream of messages so we decouple actual role logic from tansport layer and encryption layer. This is useful for example if I want to initialize inside my application, and somewhere else in the application I already received and decrypted the messages. As I said above is a generic comment about this issue. Not sure if is suited for your PR or not.

@jbesraa
Copy link
Contributor Author

jbesraa commented Aug 22, 2024

Done at #993

@jbesraa jbesraa closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
job-declarator-client refactor Implies refactoring code
Projects
None yet
Development

No branches or pull requests

3 participants