Code Monkey home page Code Monkey logo

x-gateway's Introduction

x-gateway

基于Go-micro的高性能网关,增加自定义micro工具,如AuthCORS等.

API​​网关为服务提供一个统一的公共流量入口。

MICRO-API

API-Gateway的应用场景

  • 流量入口,统一用户访问的全部或者部分流量入口,包括移动端、PC Web端.
  • 允许不同系统的用户通过相同的网关访问后端的不同系统.
  • 对用户的请求进行统一认证(同时依赖后端认证服务).
  • 对用户操作进行鉴权(权限校验),确定用户是否具有具有操作或者访问资源的权限(同时依赖后端鉴权服务).
  • 记录用户的操作行为.
  • 追踪用户的操作行为链.

功能设计

  • 认证&鉴权JWT+Casbin Auth
  • 跨域支持 CORS
  • Metrics Prometheus
  • Trace Opentracing
  • REST to GRPC 转换REST调用到GRPC(HTTP[s] -> API-Gateway -> Micro Srv)[计划中...]
  • 提供服务发现
  • 动态路由公共
  • 高性能
  • 智能路由
  • 流量控制管理
  • 日志定制
  • 链路追踪
  • 认证
  • 版本化
  • 灰度,AB策略
  • ...

TODO

运行网关

# 编译
$ make build

# 直接运行
$ ./x-gateway                                   # 效果等于 运行`micro api` 

# API
$ make run_api                                  # 默认mdns + http
$ make run_api registry=etcd transport=tcp      # 指定etcd + tcp

# Web
$ make run_web                                  # 默认mdns + http
$ make run_web registry=etcd transport=tcp      # 指定etcd + tcp

Docker

# tag自定义
$ make docker tag=docker.pkg.github.com/micro-in-cn/x-gateway/x-gateway:v1.15.0

x-gateway's People

Contributors

crazybber avatar hb-chen avatar printfcoder 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.