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

Refacto - Minimal Server fragment_request && CLI enhancement #66

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

jabibamman
Copy link
Owner

No description provided.

- Add the possibility to use -v or -d to print log or not in the console
- Added `use shared::types::error::FractalError;` to the `fractal_generation.rs` file.
- Changed the return type of the `generate_fractal_set` function in `fractal_generation.rs` to `Result<ImageBuffer<Rgb<u8>, Vec<u8>>, FractalError>`.
- Updated the function signature and implementation of the `main` function in `main.rs`.
- Moved the code related to networking into a separate module called `networking.rs`.
- Added new functions in the `networking.rs` module:
  - `connect_to_server`: Connects to a server at the specified address.
  - `send_request`: Sends a request to the server.
  - `receive_fragment_task`: Receives a FragmentTask from the server.
  - `save_fractal_image`: Saves a fractal image to the filesystem.
  - `process_fragment_task`: Processes a FragmentTask by generating a fractal image and saving it to the filesystem.
@jabibamman jabibamman self-assigned this Jan 6, 2024
@jabibamman jabibamman added the enhancement New feature or request label Jan 6, 2024
@jabibamman jabibamman force-pushed the feat/server/fragment-request branch from 6450dfe to b31a16c Compare January 6, 2024 15:39
@jabibamman jabibamman force-pushed the feat/server/fragment-request branch from b31a16c to 4ba04c0 Compare January 6, 2024 15:42
@jabibamman jabibamman force-pushed the feat/server/fragment-request branch from b499ee1 to 2f973a8 Compare January 6, 2024 16:05
This commit adds options for using verbose and debug log levels in the server and client. The `README.md` file has been updated to include instructions on how to use these log levels. Now, users can run the server with verbose logs using `cargo run -p server -- -v`, or with debug logs using `cargo run -p server -- -d`. Similarly, they can run the client with verbose logs using `cargo run -p client -- -v`, or with debug logs using `cargo run -p client -- -d`.
@jabibamman jabibamman merged commit 327135a into develop Jan 8, 2024
3 of 4 checks passed
@jabibamman jabibamman deleted the feat/server/fragment-request branch January 8, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants