refactor: update NewPingManager to accept a config file parameter

- Modified the NewPingManager function to include a configFile argument for better SSH configuration management.
- Updated all relevant tests to reflect the new function signature.
- Enhanced ping functionality to support ProxyJump and ProxyCommand using an external SSH command.
- Adjusted UI initialization to pass the config file to the PingManager.

This change improves flexibility in managing SSH connections and enhances the overall functionality of the ping manager.
This commit is contained in:
Vladislav Chmelyuk
2026-02-04 14:17:28 +03:00
parent 58a9e6f40f
commit 5d0c0ffcf3
3 changed files with 88 additions and 28 deletions

View File

@@ -38,7 +38,7 @@ func NewModel(hosts []config.SSHHost, configFile string, searchMode bool, curren
styles := NewStyles(80) // Default width
// Initialize ping manager with 5 second timeout
pingManager := connectivity.NewPingManager(5 * time.Second)
pingManager := connectivity.NewPingManager(5*time.Second, configFile)
// Create the model with default sorting by name
m := Model{