agent_icon: the subject's docs no longer mention a writer that publishes directly
This commit is contained in:
parent
f6a265421f
commit
f8a0388457
1 changed files with 4 additions and 5 deletions
|
|
@ -40,8 +40,8 @@ pub const MEDIA_TYPE: &str = "image/svg+xml";
|
|||
/// The subject `agent`'s entry is written on: `$KV.<bucket>.<key>`, where the
|
||||
/// key is the agent name and nothing else.
|
||||
///
|
||||
/// A KV put is a `JetStream` publish to this subject, so a writer that
|
||||
/// publishes directly has to use the same subject the bucket's `get` reads.
|
||||
/// A KV put is a `JetStream` publish to this subject, and the bucket's `get`
|
||||
/// reads the same one.
|
||||
#[must_use]
|
||||
pub fn subject(agent: &str) -> String {
|
||||
format!("$KV.{BUCKET}.{agent}")
|
||||
|
|
@ -51,9 +51,8 @@ pub fn subject(agent: &str) -> String {
|
|||
mod tests {
|
||||
use super::subject;
|
||||
|
||||
/// One token after the bucket, the agent name alone. That is what the
|
||||
/// per-agent grant `$KV.agent-icons.{agent}` expands to, and what a
|
||||
/// hive-scoped grant (`$KV.<bucket>.<hive>.*`, two tokens) cannot match.
|
||||
/// One token after the bucket, the agent name alone: no hive in the key, so
|
||||
/// a hive-scoped subject (`$KV.<bucket>.<hive>.*`, two tokens) cannot match.
|
||||
#[test]
|
||||
fn the_published_subject_carries_the_agent_and_no_placement() {
|
||||
assert_eq!(subject("iris"), "$KV.agent-icons.iris");
|
||||
|
|
|
|||
Loading…
Reference in a new issue