Skip to content

jpittis/toxiproxy-haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Haskell client for Toxiproxy.

(Requires Toxiproxy version 2.1.3 and above.)

Example

import Toxiproxy

main :: IO ()
main = do
  let proxy = Proxy
        { proxyName     = "myProxy"
        , proxyListen   = myProxyHost
        , proxyUpstream = myUpstreamHost
        , proxyEnabled  = True
        , proxyToxics   = []
        }
  let latency = Toxic
        { toxicName       = "latency"
        , toxicType       = Latency
        , toxicStream     = Upstream
        , toxicToxicity   = 1
        , toxicAttributes = Map.fromList [("latency", 1000), ("jitter", 0)]
        }
  withProxy proxy $ \proxy ->
    withToxic proxy latency getRequestToMyProxyHost -- This will take > 1 second

About

A Haskell client for Toxiproxy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published