Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeResponse ¶ added in v0.7.0
FakeResponse is a response given by the FakeRoundTripper
type FakeRoundTripper ¶ added in v0.7.0
type FakeRoundTripper struct { // Return an error if host header does not match this ExpectHost string // LockerCh blocks responses being sent until a struct is written to the channel LockerCh chan struct{} // ProbeHostResponses are popped when a probe request is made to a given host. If // no host is matched then this falls back to the behavior or ProbeResponses ProbeHostResponses map[string][]FakeResponse // Responses to probe requests are popped from this list until it is size 1 then // that response is returned indefinitely ProbeResponses []FakeResponse // Response to non-probe requests RequestResponse *FakeResponse NumProbes atomic.Int32 // contains filtered or unexported fields }
FakeRoundTripper is a roundtripper emulator useful in testing
Click to show internal directories.
Click to hide internal directories.