Toxiproxy - Rust client
Rust client for Toxiproxy.
Usage
Populating proxies:
let proxies = TOXIPROXY.populate?;
Testing with an unavailable connection:
TOXIPROXY.find_and_reset_proxy?.with_down?;
Testing with toxics (for full documentation on available toxics see the original docs):
TOXIPROXY.find_and_reset_proxy?.with_latency.apply?;
Or without a safe lambda (that takes care of resetting a proxy):
TOXIPROXY.find_proxy?.with_latency
// Calling the desired service...
TOXIPROXY.find_proxy?.disable;
// Test unavailability.
TOXIPROXY.find_proxy?.enable;
Supported toxics:
Using a custom address for Toxiproxy server:
let toxiclient: Client = new;
Development
Tests: