ballast客户端负载平衡框架

ballast的Python项目详细描述


https://img.shields.io/pypi/v/ballast.svghttps://img.shields.io/pypi/status/ballast.svghttps://travis-ci.org/thomasstreet/ballast.svg?branch=masterhttps://coveralls.io/repos/github/thomasstreet/ballast/badge.svg?branch=masterDocumentation Status

进程间客户端负载平衡框架 云服务之间的通信。

它在很大程度上受到了Netflix的启发 Ribbon用于java。

如何使用

在其最基本的形式中,您可以创建一个带有静态服务器列表的ballast.service

>>>importballast>>>my_service=ballast.Service(['127.0.0.1','127.0.0.2'])

现在,使用它就像使用requests 套餐:

>>>response=my_service.get('/v1/path/to/resource')<Response[200]>

注意:此时,只有 requests包受支持。

对于高级用法,请签出docs

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java NetBeans无法找到组织。postgresql。ds。PGSimpleDataSource驱动程序   java如何使用spring data mongodb查询引用无效的文档   jsonpath java。lang.NoSuchFieldError:defaultReader   java MissingResourceException:找不到基本名称资源的捆绑包。控制。控件\u res,区域设置en   使用cordova时出现java_HOME错误   java接口、泛型和重构   安卓 Java最佳实践:嵌套getter?还是代表?   java在应用程序中需要尾部斜杠。xml   java不兼容类型:lambda表达式中的错误返回类型| void不是函数接口   实体中的java空数据,但在发送时不为空。怎么可能呢?   java equal运算符如何处理基元和对象类型数据   java在postgresql(spring)中设置默认模式   java在TreeMap、HashMap或LinkedHashMap中使用重复键存储值   如何让springboot@Async与Java 8协同工作   java向JPanel添加内容   javascript扫描三维模型外表面并使用Autodesk forge API创建模型副本