Skip to content

refactor: reorganize engines into dedicated directory and extract logic#145

Merged
Cleboost merged 3 commits into
masterfrom
refactor/engines-directory
May 11, 2026
Merged

refactor: reorganize engines into dedicated directory and extract logic#145
Cleboost merged 3 commits into
masterfrom
refactor/engines-directory

Conversation

@Cleboost
Copy link
Copy Markdown
Owner

@Cleboost Cleboost commented May 11, 2026

This pull request refactors the codebase to modularize engine-related functionality, introduces new features for Docker and system monitoring, and improves SSH session management. The changes focus on code organization, reusability, and extensibility, as well as adding new capabilities for interacting with remote hosts.

Codebase modularization:

  • Moved SSH and SFTP logic into the new src/engines/ssh.rs and src/engines/sftp.rs files, and updated imports throughout the codebase to use the new engine modules. The main module now imports engines instead of individual engine files. [1] [2] [3] [4] [5]

New features: Docker and system monitoring:

  • Added src/engines/docker.rs with async functions to retrieve Docker stats, list containers/images, and perform Docker actions (start, stop, remove, etc.) on remote hosts.
  • Refactored the Docker UI to use the new engine functions, improving separation of concerns and reliability. [1] [2] [3] [4] [5]
  • Added src/engines/monitor.rs with a SystemMetrics struct and a function to fetch comprehensive system metrics (OS, RAM, disk, CPU, etc.) from remote hosts.

SSH session management improvements:

  • Implemented SSH session pooling and reuse in engines::ssh, reducing the overhead of establishing new sessions and improving performance. [1] [2] [3]
  • Enhanced session health checks to ensure only valid sessions are reused.

Logging and tracing:

  • Replaced most debug! logging calls with tracing::trace! for more granular and consistent tracing throughout SSH and engine operations. [1] [2] [3] [4] [5] [6] [7]

These changes make the codebase more maintainable, extensible, and robust for future development.

@Cleboost Cleboost merged commit c9d012c into master May 11, 2026
1 check passed
@Cleboost Cleboost deleted the refactor/engines-directory branch May 11, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant