Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohazamani/rate-limiter
https://github.com/mohazamani/rate-limiter
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mohazamani/rate-limiter
- Owner: MohaZamani
- Created: 2022-08-14T05:36:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T05:46:32.000Z (over 2 years ago)
- Last Synced: 2024-10-17T23:23:17.567Z (28 days ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rate Limiter
this api is a rate limit for handling number of requests with differents ways.
i use PostgreSQL as database.
### Setup DataBase:
```
1. go to db package.
2. in GetConnection function put your database data.
```### types of limiters :
#### 1. ByIp
```
this function limit number of requests base on IP Adddress.
```#### 2. ByAppKey
```
this function limit number of requests base on content of header in X-App-Key.
```#### 3. combinational
```
this limit number of requests by use of IP and content of header in X-App-Key.
```