-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
3,902 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/docs/ | ||
/lib/ | ||
/bin/ | ||
/.shards/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,291 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="generator" content="Crystal Docs 0.34.0"> | ||
<meta name="crystal_docs.project_version" content="main-dev"> | ||
<meta name="crystal_docs.project_name" content="rate_limiter"> | ||
|
||
|
||
<link href="css/style.css" rel="stylesheet" type="text/css" /> | ||
<script type="text/javascript" src="js/doc.js"></script> | ||
|
||
<svg class="hidden"> | ||
<symbol id="octicon-link" viewBox="0 0 16 16"> | ||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path> | ||
</symbol> | ||
</svg> | ||
|
||
<meta id="repository-name" content="rate_limiter"> | ||
<title>RateLimiter - rate_limiter main-dev</title> | ||
<script type="text/javascript"> | ||
CrystalDocs.base_path = ""; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div class="sidebar"> | ||
<div class="sidebar-header"> | ||
<div class="search-box"> | ||
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search"> | ||
</div> | ||
|
||
<div class="project-summary"> | ||
<h1 class="project-name"> | ||
<a href="index.html"> | ||
rate_limiter | ||
</a> | ||
</h1> | ||
|
||
<span class="project-version"> | ||
main-dev | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<div class="search-results" class="hidden"> | ||
<ul class="search-list"></ul> | ||
</div> | ||
|
||
<div class="types-list"> | ||
<ul> | ||
|
||
<li class="parent open current" data-id="rate_limiter/RateLimiter" data-name="ratelimiter"> | ||
<a href="RateLimiter.html">RateLimiter</a> | ||
|
||
<ul> | ||
|
||
<li class=" " data-id="rate_limiter/RateLimiter/Limiter" data-name="ratelimiter::limiter"> | ||
<a href="RateLimiter/Limiter.html">Limiter</a> | ||
|
||
</li> | ||
|
||
<li class=" " data-id="rate_limiter/RateLimiter/LimiterLike" data-name="ratelimiter::limiterlike"> | ||
<a href="RateLimiter/LimiterLike.html">LimiterLike</a> | ||
|
||
</li> | ||
|
||
<li class=" " data-id="rate_limiter/RateLimiter/MultiLimiter" data-name="ratelimiter::multilimiter"> | ||
<a href="RateLimiter/MultiLimiter.html">MultiLimiter</a> | ||
|
||
</li> | ||
|
||
<li class=" " data-id="rate_limiter/RateLimiter/Timeout" data-name="ratelimiter::timeout"> | ||
<a href="RateLimiter/Timeout.html">Timeout</a> | ||
|
||
</li> | ||
|
||
<li class=" " data-id="rate_limiter/RateLimiter/Token" data-name="ratelimiter::token"> | ||
<a href="RateLimiter/Token.html">Token</a> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
||
|
||
</li> | ||
|
||
</ul> | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
<div class="main-content"> | ||
<h1 class="type-name"> | ||
|
||
<span class="kind">module</span> RateLimiter | ||
|
||
</h1> | ||
|
||
|
||
|
||
|
||
|
||
<h2> | ||
<a id="overview" class="anchor" href="#overview"> | ||
<svg class="octicon-link" aria-hidden="true"> | ||
<use href="#octicon-link"/> | ||
</svg> | ||
</a> | ||
Overview | ||
</h2> | ||
|
||
<p>Rate limiting functionality.</p> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h2> | ||
<a id="defined-in" class="anchor" href="#defined-in"> | ||
<svg class="octicon-link" aria-hidden="true"> | ||
<use href="#octicon-link"/> | ||
</svg> | ||
</a> | ||
Defined in: | ||
</h2> | ||
|
||
|
||
|
||
|
||
|
||
<h2> | ||
<a id="constant-summary" class="anchor" href="#constant-summary"> | ||
<svg class="octicon-link" aria-hidden="true"> | ||
<use href="#octicon-link"/> | ||
</svg> | ||
</a> | ||
Constant Summary | ||
</h2> | ||
|
||
<dl> | ||
|
||
<dt class="entry-const" id="VERSION"> | ||
<strong>VERSION</strong> = <code><span class="s">"1.0.0"</span></code> | ||
</dt> | ||
|
||
|
||
</dl> | ||
|
||
|
||
|
||
<h2> | ||
<a id="constructors" class="anchor" href="#constructors"> | ||
<svg class="octicon-link" aria-hidden="true"> | ||
<use href="#octicon-link"/> | ||
</svg> | ||
</a> | ||
Constructors | ||
</h2> | ||
<ul class="list-summary"> | ||
|
||
<li class="entry-summary"> | ||
<a href="#new(rate:Float64,max_burst:Int32=1)-class-method" class="signature"><strong>.new</strong>(rate : Float64, max_burst : Int32 = <span class="n">1</span>)</a> | ||
|
||
<div class="summary"><p>Creates a new <code><a href="RateLimiter/Limiter.html">Limiter</a></code>.</p></div> | ||
|
||
</li> | ||
|
||
<li class="entry-summary"> | ||
<a href="#new(interval:Time::Span,max_burst:Int32=1)-class-method" class="signature"><strong>.new</strong>(interval : Time::Span, max_burst : Int32 = <span class="n">1</span>)</a> | ||
|
||
<div class="summary"><p>Creates a new <code><a href="RateLimiter/Limiter.html">Limiter</a></code>.</p></div> | ||
|
||
</li> | ||
|
||
<li class="entry-summary"> | ||
<a href="#new(*limiters:Limiter)-class-method" class="signature"><strong>.new</strong>(*limiters : Limiter)</a> | ||
|
||
<div class="summary"><p>Creates a <code><a href="RateLimiter/MultiLimiter.html">MultiLimiter</a></code>.</p></div> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="methods-inherited"> | ||
|
||
</div> | ||
|
||
|
||
<h2> | ||
<a id="constructor-detail" class="anchor" href="#constructor-detail"> | ||
<svg class="octicon-link" aria-hidden="true"> | ||
<use href="#octicon-link"/> | ||
</svg> | ||
</a> | ||
Constructor Detail | ||
</h2> | ||
|
||
<div class="entry-detail" id="new(rate:Float64,max_burst:Int32=1)-class-method"> | ||
<div class="signature"> | ||
|
||
def self.<strong>new</strong>(rate : Float64, max_burst : Int32 = <span class="n">1</span>) | ||
|
||
<a class="method-permalink" href="#new(rate:Float64,max_burst:Int32=1)-class-method">#</a> | ||
</div> | ||
|
||
<div class="doc"> | ||
|
||
<p>Creates a new <code><a href="RateLimiter/Limiter.html">Limiter</a></code>. | ||
<code>rate</code>: the rate of tokens being produced in tokens/second. | ||
<code>max_burst</code>: maximum number of tokens that can be stored in the bucket.</p> | ||
</div> | ||
|
||
<br/> | ||
<div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="entry-detail" id="new(interval:Time::Span,max_burst:Int32=1)-class-method"> | ||
<div class="signature"> | ||
|
||
def self.<strong>new</strong>(interval : Time::Span, max_burst : Int32 = <span class="n">1</span>) | ||
|
||
<a class="method-permalink" href="#new(interval:Time::Span,max_burst:Int32=1)-class-method">#</a> | ||
</div> | ||
|
||
<div class="doc"> | ||
|
||
<p>Creates a new <code><a href="RateLimiter/Limiter.html">Limiter</a></code>. | ||
<code>interval</code>: the interval at which new tokens are generated. | ||
<code>max_burst</code>: maximum number of tokens that can be stored in the bucket.</p> | ||
</div> | ||
|
||
<br/> | ||
<div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="entry-detail" id="new(*limiters:Limiter)-class-method"> | ||
<div class="signature"> | ||
|
||
def self.<strong>new</strong>(*limiters : <a href="RateLimiter/Limiter.html">Limiter</a>) | ||
|
||
<a class="method-permalink" href="#new(*limiters:Limiter)-class-method">#</a> | ||
</div> | ||
|
||
<div class="doc"> | ||
|
||
<p>Creates a <code><a href="RateLimiter/MultiLimiter.html">MultiLimiter</a></code>. | ||
<code>limiters</code>: a set of rate limiters.</p> | ||
</div> | ||
|
||
<br/> | ||
<div> | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.