Skip to content

Commit 71dd119

Browse files
committed
update example to reflect latest version
1 parent c5ce85d commit 71dd119

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A complete Haskell client for [Toxiproxy](https://github.com/Shopify/toxiproxy).
1+
A Haskell client for [Toxiproxy](https://github.com/Shopify/toxiproxy).
22

33
(Requires Toxiproxy version 2.1.3 and above.)
44

@@ -18,12 +18,11 @@ main = do
1818
}
1919
let latency = Toxic
2020
{ toxicName = "latency"
21-
, toxicType = "latency"
22-
, toxicStream = "upstream"
21+
, toxicType = Latency
22+
, toxicStream = Upstream
2323
, toxicToxicity = 1
2424
, toxicAttributes = Map.fromList [("latency", 1000), ("jitter", 0)]
2525
}
26-
withProxy proxy $ \proxy -> do
27-
withToxic proxy latency $ do
28-
getRequestToMyProxyHost -- This will take > 1 second
26+
withProxy proxy $ \proxy ->
27+
withToxic proxy latency getRequestToMyProxyHost -- This will take > 1 second
2928
````

0 commit comments

Comments
 (0)