pub struct CoordinatedGroup { /* private fields */ }Expand description
A group of agent handles with coordination primitives.
Supports fan-out (parallel work), voting, and map-reduce patterns.
Implementations§
Source§impl CoordinatedGroup
impl CoordinatedGroup
Sourcepub fn builder() -> CoordinatedGroupBuilder
pub fn builder() -> CoordinatedGroupBuilder
Create a new builder.
Sourcepub async fn fan_out(
&self,
work_type: &str,
payloads: Vec<Value>,
) -> Vec<WorkResult>
pub async fn fan_out( &self, work_type: &str, payloads: Vec<Value>, ) -> Vec<WorkResult>
Fan-out: distribute payloads across agents via the work queue.
Each agent claims and executes one item in parallel.
Sourcepub async fn vote(&self, question: &str, options: &[&str]) -> Option<VoteResult>
pub async fn vote(&self, question: &str, options: &[&str]) -> Option<VoteResult>
Vote: each agent casts a vote on a question.
Uses the consensus module. Returns None if no consensus is configured.
Sourcepub async fn map_reduce(
&self,
work_type: &str,
payloads: Vec<Value>,
reduce_key: &MemoryKey,
) -> Result<Vec<WorkResult>>
pub async fn map_reduce( &self, work_type: &str, payloads: Vec<Value>, reduce_key: &MemoryKey, ) -> Result<Vec<WorkResult>>
Map-reduce: each agent processes a payload, results stored in shared memory.
Auto Trait Implementations§
impl !RefUnwindSafe for CoordinatedGroup
impl !UnwindSafe for CoordinatedGroup
impl Freeze for CoordinatedGroup
impl Send for CoordinatedGroup
impl Sync for CoordinatedGroup
impl Unpin for CoordinatedGroup
impl UnsafeUnpin for CoordinatedGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more