Interface IRateLimit
Namespace: MingweiSamuel.Camille.Util
Assembly: Camille.dll
Syntax
public interface IRateLimit
Methods
| Improve this Doc View SourceGetBuckets()
Get the rate limit's buckets.
Declaration
IReadOnlyList<ITokenBucket> GetBuckets()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<ITokenBucket> | Current buckets. |
GetRetryAfterDelay()
Get delay needed to respect retry-after headers.
Declaration
long GetRetryAfterDelay()
Returns
Type | Description |
---|---|
System.Int64 | Ticks to delay or -1 if none needed. Zero may be returned. |
OnResponse(HttpResponseMessage)
Callback for when a response returns. Used to update RetryAfter delay and rate limit buckets.
Declaration
void OnResponse(HttpResponseMessage response)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpResponseMessage | response | Response that applies to this RateLimit. |