Creates a new DockerManager with the given application context and Docker client. # Arguments `ctx` - The application context containing all dependencies `client` - The Docker client for container operations `event_sender` - Optional TUI event channel for structured output
(
ctx: &AppContext,
client: Arc<dyn DockerClient>,
event_sender: Option<ServerEventSender>,
)
| 168 | /// * `client` - The Docker client for container operations |
| 169 | /// * `event_sender` - Optional TUI event channel for structured output |
| 170 | pub fn new( |
| 171 | ctx: &AppContext, |
| 172 | client: Arc<dyn DockerClient>, |
| 173 | event_sender: Option<ServerEventSender>, |
| 174 | ) -> Self { |
| 175 | let proxy_manager = ProxyManager::new( |
| 176 | client.clone(), |
| 177 | ctx.tsk_env(), |
| 178 | ctx.tsk_config().container_engine.clone(), |
| 179 | event_sender.clone(), |
| 180 | ); |
| 181 | Self { |
| 182 | ctx: ctx.clone(), |
| 183 | client, |
| 184 | proxy_manager, |
| 185 | event_sender, |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /// Route an event through the TUI channel when available, otherwise print directly. |
| 190 | fn emit(&self, event: ServerEvent) { |
nothing calls this directly
no test coverage detected