gate each deploy on a swarm build of the agent from internal/meta
This commit is contained in:
parent
3db835fb57
commit
5e64048e53
1 changed files with 1570 additions and 178 deletions
19
swarm-queue-client/src/agent_closures.rs
Normal file
19
swarm-queue-client/src/agent_closures.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//! The connection side of the per-agent closure KV bucket. The bucket's names
|
||||
//! and stored type are `swarm_wire::agent_closures`.
|
||||
|
||||
/// Open the closures bucket for writing, creating it if nothing has yet.
|
||||
///
|
||||
/// **Controller-side only.** `history: 1`: a reader wants the latest build.
|
||||
#[cfg(feature = "kv")]
|
||||
pub async fn open_or_create(
|
||||
client: &async_nats::Client,
|
||||
) -> Result<async_nats::jetstream::kv::Store, crate::Error> {
|
||||
let js = async_nats::jetstream::new(client.clone());
|
||||
crate::kv::open_or_create(
|
||||
&js,
|
||||
swarm_wire::agent_closures::BUCKET,
|
||||
"agent-closures",
|
||||
"The latest system closure the swarm builder built for each agent".to_owned(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
Loading…
Reference in a new issue