Giter Club home page Giter Club logo

warden's Introduction

openresty upstream 动态调度

export addr=$IP:$PORT

group

创建group

curl -X PUT $addr/api/group/test_group

删除group

curl -X DELETE $addr/api/group/test_group

查看所有group

curl -X GET $addr/api/group

openresty

创建openresty

curl -X PUT $addr/api/openresty/test_group/127.0.0.1/80

删除openresty

curl -X DELETE $addr/api/openresty/test_group/127.0.0.1/80

获取组内所有openresty

curl -X GET $addr/api/openresty/test_group

project

创建project

curl -X PUT $addr/api/project/test_group/test_proj

删除project

curl -X DELETE $addr/api/project/test_group/test_proj

获取组内所有project

curl -X GET $addr/api/project/test_group

environment

创建项目的环境

curl -X PUT $addr/api/enviroment/test_group/test_proj/test_env

删除项目的环境

curl -X DELETE $addr/api/enviroment/test_group/test_proj/test_env

获取项目所有环境

curl -X GET $addr/api/enviroment/test_group/test_proj

upstream

为环境添加upstream

curl -X PUT $addr/api/upstream/test_group/test_proj/test_env/127.0.0.1/9031

删除upstream

curl -X DELETE $addr/api/upstream/test_group/test_proj/test_env/127.0.0.1/9031

查看环境中所有upstream

curl -X GET $addr/api/upstream/test_group/test_proj/test_env

灰度和特殊环境设置

设置项目的环境uid尾数灰度比例(总和必须为100,环境名称必须全,否则报错)

curl -X POST $addr/api/enviroment/test_group/test_proj -d 'test_env1=10&test_en2=20&test_env3=30&test_en4=40'

设置项目的特殊环境名称(名字必须在该项目的环境中,特定uid的走特殊环境)
清空项目的特殊环境(不传环境名即可)

curl -X PUT $addr/api/special_env/test_group/test_proj/test_env2

设置无uid�环境名称(名字必须在该项目的环境中,无uid的请求走此环境, 同步配置前必须设置)
curl -X PUT $addr/api/no_uid_env/test_group/test_proj/test_env3

设置项目走特殊环境的uid

curl -X PUT $addr/api/special_uid/test_group/test_proj/123,456,789

清空项目走特殊环境的uid(与上个api一样,不传uid即可)

curl -X PUT $addr/api/special_uid/test_group/test_proj/

同步配置

同步组中指定项目的配置

curl -X POST $addr/api/config/test_group/test_proj

健康检查

curl -X GET $addr/api/health

warden's People

Contributors

st0newan9 avatar

Watchers

pawaca avatar  avatar Shawn Meng avatar lyj avatar James Cloos avatar  avatar HaKeem avatar GK.ZHONG avatar Edmond avatar Dong Mingxin 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.