Class: Ratelimit
A rate limiter associated with one or more callers
Fields for class: Ratelimit
| Field | Type | Qualifier | Description |
|---|---|---|---|
burst_size |
float |
RO/constructor | Maximum tokens that the bucket can hold |
callers |
Caller ref set |
RO/runtime | The set of callers attached to this rate limiter |
fill_rate |
float |
RO/constructor | Tokens added to the bucket per second |
name_description |
string |
RW | a notes field containing human-readable description |
name_label |
string |
RW | a human-readable name |
uuid |
string |
RO/runtime | Unique identifier/object reference |
RPCs associated with class: Ratelimit
RPC name: addcaller
Overview:
Attach the given caller to this rate limiter. Replaces any rate limiter previously attached to the caller.
Signature:
void add_caller (session ref session_ref, Rate_limit ref self, Caller ref caller)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
The rate limiter |
Caller ref |
caller |
The caller to attach |
Minimum Role: pool-admin
Return Type:
void
RPC name: create
Overview:
Create a new Ratelimit instance, and return its handle.
Signature:
Rate_limit ref create (session ref session_ref, Rate_limit record args)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit record |
args |
All constructor arguments |
Minimum Role: pool-admin
Return Type:
Rate_limit ref
reference to the newly created object
RPC name: destroy
Overview:
Destroy the specified Ratelimit instance.
Signature:
void destroy (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: pool-admin
Return Type:
void
RPC name: getall
Overview:
Return a list of all the Ratelimits known to the system.
Signature:
Rate_limit ref set get_all (session ref session_ref)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type:
Rate_limit ref set
references to all objects
RPC name: getallrecords
Overview:
Return a map of Ratelimit references to Ratelimit records for all Ratelimits known to the system.
Signature:
(Rate_limit ref -> Rate_limit record) map get_all_records (session ref session_ref)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type:
(Rate_limit ref -> Rate_limit record) map
records of all objects
RPC name: getburstsize
Overview:
Get the burstsize field of the given Ratelimit.
Signature:
float get_burst_size (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
float
value of the field
RPC name: getbynamelabel
Overview:
Get all the Ratelimit instances with the given label.
Signature:
Rate_limit ref set get_by_name_label (session ref session_ref, string label)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
label |
label of object to return |
Minimum Role: read-only
Return Type:
Rate_limit ref set
references to objects with matching names
RPC name: getbyuuid
Overview:
Get a reference to the Ratelimit instance with the specified UUID.
Signature:
Rate_limit ref get_by_uuid (session ref session_ref, string uuid)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
uuid |
UUID of object to return |
Minimum Role: read-only
Return Type:
Rate_limit ref
reference to the object
RPC name: getcallers
Overview:
Get the callers field of the given Ratelimit.
Signature:
Caller ref set get_callers (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
Caller ref set
value of the field
RPC name: getfillrate
Overview:
Get the fillrate field of the given Ratelimit.
Signature:
float get_fill_rate (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
float
value of the field
RPC name: getnamedescription
Overview:
Get the name/description field of the given Ratelimit.
Signature:
string get_name_description (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getnamelabel
Overview:
Get the name/label field of the given Ratelimit.
Signature:
string get_name_label (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: getrecord
Overview:
Get a record containing the current state of the given Ratelimit.
Signature:
Rate_limit record get_record (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
Rate_limit record
all fields from the object
RPC name: getuuid
Overview:
Get the uuid field of the given Ratelimit.
Signature:
string get_uuid (session ref session_ref, Rate_limit ref self)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
Minimum Role: read-only
Return Type:
string
value of the field
RPC name: removecaller
Overview:
Detach the given caller from this rate limiter
Signature:
void remove_caller (session ref session_ref, Rate_limit ref self, Caller ref caller)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
The rate limiter |
Caller ref |
caller |
The caller to detach |
Minimum Role: pool-admin
Return Type:
void
RPC name: setburstsize
Overview:
Set the burst size of the rate limiter
Signature:
void set_burst_size (session ref session_ref, Rate_limit ref self, float value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
The rate limiter |
float |
value |
The new burst size, must be positive |
Minimum Role: pool-admin
Return Type:
void
RPC name: setfillrate
Overview:
Set the fill rate of the rate limiter
Signature:
void set_fill_rate (session ref session_ref, Rate_limit ref self, float value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
The rate limiter |
float |
value |
The new fill rate (tokens/second), must be positive |
Minimum Role: pool-admin
Return Type:
void
RPC name: setnamedescription
Overview:
Set the name/description field of the given Ratelimit.
Signature:
void set_name_description (session ref session_ref, Rate_limit ref self, string value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
string |
value |
New value to set |
Minimum Role: pool-admin
Return Type:
void
RPC name: setnamelabel
Overview:
Set the name/label field of the given Ratelimit.
Signature:
void set_name_label (session ref session_ref, Rate_limit ref self, string value)
Arguments:
| Type | Name | Description |
|---|---|---|
session ref |
session_ref |
Reference to a valid session |
Rate_limit ref |
self |
reference to the object |
string |
value |
New value to set |
Minimum Role: pool-admin
Return Type:
void