Concord - C Discord API library
A Discord API wrapper library written in C
discord_ratelimiter Struct Reference

The ratelimiter struct for handling ratelimiting. More...

#include <discord-internal.h>

Collaboration diagram for discord_ratelimiter:
[legend]

Data Fields

struct logconf conf
 
int length
 
int capacity
 
struct _discord_route * routes
 
struct discord_bucketnull
 
struct discord_bucketmiss
 
u64unix_msglobal_wait_tstamp
 
struct {
queues
 

Detailed Description

The ratelimiter struct for handling ratelimiting.

Note
this struct SHOULD only be handled from the REST manager thread

Field Documentation

◆ conf

struct logconf discord_ratelimiter::conf

DISCORD_RATELIMIT logging module

◆ length

int discord_ratelimiter::length

amount of bucket's routes discovered

◆ capacity

int discord_ratelimiter::capacity

route's cap before increase

◆ routes

struct _discord_route* discord_ratelimiter::routes

routes matched to individual buckets

Note
datatype declared at discord-rest_ratelimit.c

◆ null

struct discord_bucket* discord_ratelimiter::null

singleton bucket for requests that haven't been matched to a known or new bucket (i.e first time running the request)

◆ miss

struct discord_bucket* discord_ratelimiter::miss

singleton bucket for requests that are not part of any known ratelimiting group

◆ global_wait_tstamp

u64unix_ms* discord_ratelimiter::global_wait_tstamp

◆ 

struct { ... } discord_ratelimiter::queues

bucket queues


The documentation for this struct was generated from the following file: