Giter VIP home page Giter VIP logo

kamil's Introduction

Kamil API Gateway

Kamil is a dynamic API gateway to be used with alongside micro service architecture. All you need to do is set the config.yaml file. The good thing about Kamil is that you don't need to restart the gateway when you need to add another service.

Example

A simple config file looks like this;

routes:
 - route: /test1
   name: test1
   port: 8080
   request-types:
    - POST
   host: localhost
   
 - route: /test2/.*
   name: test2
   port: 8081
   host: localhost
  • route is the regular expression that matches the request path. Being able to use regular expressions for route matching gives the user great flexibility.

  • name field is mostly for the developer, it does not serve a goal for now.

  • port is the port that the target server is listening

  • request-types is an optional field for being able to control the requests more precisely.

  • host is the IP of the target server.

A POST request sent to the ${KAMIL_IP}/test1 would be sent to the localhost:8080/test1. If request type is not POST, an error would be returned.

Program Arguments

  • config-check-interval: Interval time in seconds that the config file would be checked for updates. Default is 2 seconds

  • port: The port which the gateway will run. Default is 3000.

  • config-file-name: Path of the config file. Default is ./config.yaml

TODO

  • Add plugin support, and build some plugins for authantication.
  • Enable adding new services from an endpoint.
  • Create a User Interface
  • Add health checks
  • Write some tests
  • Create a docker version

kamil's People

Contributors

egeucak avatar

Stargazers

 avatar

Watchers

 avatar  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.