Documentation
¶
Overview ¶
Package http wraps an http.RoundTripper so outbound client calls are subject to chaos. Construct an engine, attach rules, then pass http.DefaultTransport (or any RoundTripper) and the engine to WrapTransport. The returned RoundTripper is safe to share across goroutines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapTransport ¶
func WrapTransport(rt http.RoundTripper, eng *engine.Engine) http.RoundTripper
WrapTransport returns a RoundTripper that consults eng on every request. If eng is nil or has no rules, tha wrapper is a near-zero-cost passthrough.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.