Module: VagrantPlugins::OrbStack::Util::SSHReadinessChecker
- Defined in:
- lib/vagrant-orbstack/util/ssh_readiness_checker.rb
Overview
Utility module for waiting until SSH becomes available on an OrbStack machine
This module provides a polling mechanism to check if an OrbStack machine is ready for SSH connections. It repeatedly queries the machine status until the machine reports as 'running', indicating SSH is available.
Constant Summary collapse
- MAX_WAIT_TIME =
Maximum time to wait for SSH to become ready (in seconds)
120- POLL_INTERVAL =
Interval between status polls (in seconds)
2
Class Method Summary collapse
-
.wait_for_ready(machine_name, ui:) ⇒ Boolean
Wait for SSH to become available on a machine.
Class Method Details
.wait_for_ready(machine_name, ui:) ⇒ Boolean
Wait for SSH to become available on a machine.
Polls the machine status every POLL_INTERVAL seconds until the machine reports 'running' status, or until MAX_WAIT_TIME is exceeded. Displays progress messages via the provided UI object.
rubocop:disable Naming/MethodParameterName
55 56 57 58 59 60 61 |
# File 'lib/vagrant-orbstack/util/ssh_readiness_checker.rb', line 55 def self.wait_for_ready(machine_name, ui:) # rubocop:enable Naming/MethodParameterName ui.info("Waiting for SSH to become available on #{machine_name}...") poll_until_ready(machine_name, ui) || raise_timeout_error(machine_name) end |