the agent-icons docs name both writers, the controller and the harness
This commit is contained in:
parent
78a7f7f72c
commit
9a2b689959
2 changed files with 9 additions and 5 deletions
|
|
@ -15,7 +15,7 @@ pub async fn open_or_create(
|
||||||
&js,
|
&js,
|
||||||
swarm_wire::agent_icon::BUCKET,
|
swarm_wire::agent_icon::BUCKET,
|
||||||
"agent-icon",
|
"agent-icon",
|
||||||
"Current icon published by each agent".to_owned(),
|
"Current icon of each agent".to_owned(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,18 @@
|
||||||
//! container is stopped: the value's lifetime is the agent's, not its
|
//! container is stopped: the value's lifetime is the agent's, not its
|
||||||
//! placement's.
|
//! placement's.
|
||||||
//!
|
//!
|
||||||
//! **Each agent writes its own key** with its own queue credential. The auth
|
//! **Two writers, one value.** The swarm controller writes the key from the
|
||||||
//! callout grants that credential `$KV.agent-icons.<agent>` and no other key.
|
//! builder's reply when it builds the agent for a deploy: the builder reads the
|
||||||
|
//! icon from the agent's config, so this write needs no running agent. The
|
||||||
|
//! agent's harness writes the same key, from the same config, with its own
|
||||||
|
//! queue credential, which the auth callout grants `$KV.agent-icons.<agent>` and
|
||||||
|
//! no other key. On either side an icon that is not set deletes the key.
|
||||||
//!
|
//!
|
||||||
//! The writer publishes to [`subject`] directly instead of opening the
|
//! The harness publishes to [`subject`] directly instead of opening the
|
||||||
//! bucket, so that one subject is its whole grant. Creating the bucket is left
|
//! bucket, so that one subject is its whole grant. Creating the bucket is left
|
||||||
//! to the reader (`swarm_queue_client::agent_icon::open_or_create`). A write
|
//! to the reader (`swarm_queue_client::agent_icon::open_or_create`). A write
|
||||||
//! that arrives before the bucket exists is refused with "no stream", and the
|
//! that arrives before the bucket exists is refused with "no stream", and the
|
||||||
//! writer retries.
|
//! harness retries.
|
||||||
|
|
||||||
/// The KV bucket agent icons are published into, keyed by agent name.
|
/// The KV bucket agent icons are published into, keyed by agent name.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue