2017 © Pedro Peláez
 

library toxiproxy-php-client

PHP client for shopify/toxiproxy

image

ihsw/toxiproxy-php-client

PHP client for shopify/toxiproxy

  • Monday, January 29, 2018
  • by ihsw
  • Repository
  • 1 Watchers
  • 13 Stars
  • 35 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 11 Versions
  • 6 % Grown

The README.md

Toxiproxy PHP Client

Toxiproxy makes it easy and trivial to test network conditions, for example low-bandwidth and high-latency situations. toxiproxy-php-client includes everything needed to get started with configuring Toxiproxy upstream connection and listen endpoints., (*1)

Note: toxiproxy-php-client is currently compatible with toxiproxy-2.0+., (*2)

Installing via Composer

The recommended way to install toxiproxy-php-client is through Composer., (*3)

Once that is installed and you have added ihsw/toxiproxy-php-client to your composer.json configuration, you can require the autoloader and start using the library., (*4)

Here is an example for creating a proxy that limits a Redis connection to 1000KB/s., (*5)

<?php

require("./vendor/autoload.php");

use Ihsw\Toxiproxy\Toxiproxy;
use Ihsw\Toxiproxy\ToxicTypes;
use Ihsw\Toxiproxy\StreamDirections;

$toxiproxy = new Toxiproxy("http://toxiproxy:8474");
$proxy = $toxiproxy->create("ihsw_example_redis_master", "127.0.0.1:6379");
$toxic = $proxy->create(ToxicTypes::BANDWIDTH->value, StreamDirections::UPSTREAM->value, 1.0, [
    "rate" => 1000
]);
printf(
    "Listening on IP %s and port %s on behalf of 6379, with a connection that's limited to 1000KB/s\n",
    $proxy->getListenIp(),
    $proxy->getListenPort()
);

$toxiproxy->delete($proxy);

Documentation

Additional examples can be found in the examples directory for expected usage., (*6)

The Versions

29/01 2018
27/12 2017

dev-dev

dev-dev

PHP client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

26/12 2017

v1.1.0

1.1.0.0

PHP client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

20/05 2016

dev-toxics

dev-toxics

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

26/05 2015

v1.0.5

1.0.5.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

26/05 2015

v1.0.4

1.0.4.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

26/05 2015

v1.0.3

1.0.3.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

12/05 2015

v1.0.2

1.0.2.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

10/05 2015

v1.0.1

1.0.1.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Parker

php client toxiproxy

09/05 2015

v1.0

1.0.0.0

Php client for shopify/toxiproxy

  Sources   Download

MIT

The Development Requires

by Adrian Parker

php client toxiproxy