Watch
0
0
Fork
You've already forked hyperhive
0

swarmctl: drop the controller socket target, the host has no socket to reach

This commit is contained in:
atlas 2026-11-26 15:40:29 +01:00 • committed by maia
commit 279f97e5ca

View file

@ -15,7 +15,7 @@ use swarm_controller_api::inference::{
};
use crate::agent::{parse_ident, send};
use crate::remote::Target;
use crate::remote::Swarm;
/// What `agent inference set` was asked to change.
pub(crate) struct SetFlags {
@ -65,7 +65,7 @@ fn member(agent: &str) -> Result<String> {
}
/// Run `swarmctl agent inference get`.
pub(crate) fn get(target: &Target, agent: &str) -> Result<()> {
pub(crate) fn get(target: &Swarm, agent: &str) -> Result<()> {
let uri = member(agent)?;
let view: AgentInferenceView = runtime()?.block_on(send(
target,
@ -84,7 +84,7 @@ pub(crate) fn get(target: &Target, agent: &str) -> Result<()> {
/// Run `swarmctl agent inference set`: read the agent's settings, write the
/// flags over them, and store the result.
pub(crate) fn set(target: &Target, agent: &str, flags: SetFlags) -> Result<()> {
pub(crate) fn set(target: &Swarm, agent: &str, flags: SetFlags) -> Result<()> {
let uri = member(agent)?;
let rt = runtime()?;
let current: AgentInferenceView = rt.block_on(send(
@ -107,7 +107,7 @@ pub(crate) fn set(target: &Target, agent: &str, flags: SetFlags) -> Result<()> {
}
/// Run `swarmctl agent inference clear`.
pub(crate) fn clear(target: &Target, agent: &str) -> Result<()> {
pub(crate) fn clear(target: &Swarm, agent: &str) -> Result<()> {
let uri = member(agent)?;
runtime()?.block_on(send::<(), ()>(
target,