refactor(#1865): rename agent_server module to socket_server
Pure rename ahead of the agent+manager server consolidation: the per-agent socket dispatcher already hosts the shared dispatch and all lifecycle handlers, and will absorb the manager-only handlers next, so `agent_server` becomes a misnomer. No logic change — git mv plus a mechanical `agent_server` -> `socket_server` rename across refs.
This commit is contained in:
parent
b11360503a
commit
a053d33184
8 changed files with 14 additions and 14 deletions
|
|
@ -10,12 +10,12 @@ use std::sync::{Arc, Mutex};
|
|||
use anyhow::{Context, Result};
|
||||
use tokio::sync::{broadcast, watch};
|
||||
|
||||
use crate::agent_server::{self, AgentSocket};
|
||||
use crate::approvals::Approvals;
|
||||
use crate::broker::Broker;
|
||||
use crate::container_view::{self, ContainerView};
|
||||
use crate::dashboard_events::DashboardEvent;
|
||||
use crate::operator_questions::OperatorQuestions;
|
||||
use crate::socket_server::{self, AgentSocket};
|
||||
|
||||
/// Capacity of the dashboard event channel. Slow browser subscribers
|
||||
/// (idle tab, throttled connection) drop frames past this — that's
|
||||
|
|
@ -126,7 +126,7 @@ pub struct Coordinator {
|
|||
/// `recent_crash_counts`, which prunes entries older than its window.
|
||||
recent_crashes: Mutex<HashMap<String, Vec<std::time::Instant>>>,
|
||||
/// Agents with a graceful stop in progress. Set by the `GracefulStop`
|
||||
/// orchestration; read by `agent_server::handle_recv`, which returns
|
||||
/// orchestration; read by `socket_server::handle_recv`, which returns
|
||||
/// `Response::GracefulStop` (instead of polling the broker) while an
|
||||
/// agent is in this set — the inbound fence. Cleared when the agent
|
||||
/// reports `GracefulStopComplete` or the container is stopped.
|
||||
|
|
@ -429,7 +429,7 @@ impl Coordinator {
|
|||
crate::build_logs::install(build_logs.clone());
|
||||
// Audit log shares the same db dir; install its process-wide
|
||||
// handle so privileged-action recording sites (e.g.
|
||||
// `agent_server::handle_restart_infra`) write without threading an
|
||||
// `socket_server::handle_restart_infra`) write without threading an
|
||||
// `Arc<AuditLog>` through the agent-request surface.
|
||||
let audit_log =
|
||||
Arc::new(crate::audit_log::AuditLog::open(build_logs_dir).context("open audit_log")?);
|
||||
|
|
@ -1068,7 +1068,7 @@ impl Coordinator {
|
|||
// Hand the full Coordinator to the per-agent socket — it
|
||||
// needs broker + operator_questions to handle the agent-side
|
||||
// `ask` / `answer` tools, not just the broker.
|
||||
let socket = agent_server::start(name, &socket_path, self.clone())?;
|
||||
let socket = socket_server::start(name, &socket_path, self.clone())?;
|
||||
self.agents.lock().unwrap().insert(name.to_owned(), socket);
|
||||
Ok(agent_dir)
|
||||
}
|
||||
|
|
@ -1136,7 +1136,7 @@ impl Coordinator {
|
|||
}
|
||||
|
||||
/// Mark `name` as having a graceful stop in progress. While set,
|
||||
/// `agent_server::handle_recv` returns `Response::GracefulStop` for
|
||||
/// `socket_server::handle_recv` returns `Response::GracefulStop` for
|
||||
/// this agent instead of polling the broker (the inbound fence).
|
||||
pub fn mark_graceful_stop(&self, name: &str) {
|
||||
self.graceful_stop_pending
|
||||
|
|
|
|||
Loading…
Reference in a new issue