swarmctl: drop the controller socket target, the host has no socket to reach
This commit is contained in:
parent
64d340e385
commit
279f97e5ca
1 changed files with 174 additions and 599 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue