Weave documentation
Weave Swarm

Events and Priority

Swarm::events() returns a Tokio broadcast receiver.

Workflow and current contract

Swarm::events() returns a Tokio broadcast receiver. Handle both received SwarmEvent values and receiver errors, including lagged messages or channel closure. The event enum includes connection lifecycle information; use the declared variant fields rather than assuming every event carries a complete peer record.

Priority types and the runtime's activation/resource limits govern scheduling. Transport scheduling is separate from application authorization. Preserve cancellation, deadlines, and connection shutdown when composing the runtime.

Source reference

On this page