gaato/discord/queue does not have a README file

IdentifyQueue

pub(open) trait IdentifyQueue {
async fn wait_for_identify(Self, shard_id : Int) -> Unit
}

Serializes shard Identify calls per Discord's max_concurrency buckets. One queue instance must be shared by every shard of a bot; cross-process deployments can substitute their own implementation.

InMemoryQueue

pub struct InMemoryQueue {
// private fields
}

In-process identify queue: shard_id % max_concurrency buckets, at most one Identify per bucket per spacing_ms (default 5 seconds plus margin).

InMemoryQueue::InMemoryQueue

fn InMemoryQueue::InMemoryQueue(max_concurrency? : Int, spacing_ms? : Int) -> InMemoryQueue

Create a queue with max_concurrency identify buckets (the value Discord reports in GET /gateway/bot), spacing identifies within each bucket by spacing_ms.

Source Files