Giter VIP home page Giter VIP logo

limitador's Introduction

Limitador

Limitador GH Workflow docs.rs Crates.io Docker Repository on Quay codecov

Limitador is a generic rate-limiter written in Rust. It can be used as a library, or as a service. The service exposes HTTP endpoints to apply and observe limits. Limitador can be used with Envoy because it also exposes a grpc service, on a different port, that implements the Envoy Rate Limit protocol (v3).

Limitador is under active development, and its API has not been stabilized yet.

Getting started

Rust library

Add this to your Cargo.toml:

[dependencies]
limitador = { version = "0.3.0" }

For more information, see the README of the crate

Server

Run with Docker (replace latest with the version you want):

docker run --rm --net=host -it quay.io/kuadrant/limitador:v1.0.0

Run locally:

cargo run --release --bin limitador-server -- --help

Refer to the help message on how to start up the server. More information are available in the server's README.md

Development

Build

cargo build

Run the tests

Some tests need a redis deployed in localhost:6379. You can run it in Docker with:

docker run --rm -p 6379:6379 -it redis

Some tests need a infinispan deployed in localhost:11222. You can run it in Docker with:

docker run --rm -p 11222:11222 -it -e USER=username -e PASS=password infinispan/server:11.0.9.Final

Then, run the tests:

cargo test --all-features

or you can run tests disabling the "redis storage" feature:

cd limitador; cargo test --no-default-features

Contributing

Join us on the #kuadrant channel in the Kubernetes Slack workspace, for live discussions about the roadmap and more.

License

Apache 2.0 License

limitador's People

Contributors

davidor avatar alexsnaps avatar unleashed avatar eguzki avatar didierofrivia avatar kevfan avatar andrewdavidmackenzie avatar slopezz avatar guicassolato avatar rahulanand16nov avatar boomatang avatar chirino avatar dependabot[bot] avatar adam-cattermole avatar mstokluska avatar gsaslis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.