-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
59 lines (53 loc) · 1.55 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
defmodule Leaky.MixProject do
use Mix.Project
def project do
[
app: :leaky,
version: "0.1.1",
elixir: "~> 1.15",
name: "Leaky",
source_url: "https://github.com/ihorkatkov/leaky",
description: description(),
package: package(),
dialyzer: dialyzer(),
docs: [
main: "Leaky",
extras: ["README.md"]
],
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
defp dialyzer do
[
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:styler, "~> 0.11.1", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7.1", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.14", only: :dev, runtime: false}
]
end
defp description do
"Implements a token-based rate limiter using the leaky bucket algorithm, ideal for controlling access rates to resources in Elixir applications. This implementation leverages ETS for optimized performance, making it suitable for high-load environments."
end
defp package do
[
# This option is only needed when you don't want to use the OTP application name
name: "leaky",
licenses: ["Apache-2.0"],
links: %{"GitHub" => "https://github.com/ihorkatkov/leaky"}
]
end
end