Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturedRequest ¶
type CapturedRequest struct { Path string `json:"path"` Host string `json:"host"` Method string `json:"method"` Protocol string `json:"proto"` Headers map[string][]string `json:"headers"` Namespace string `json:"namespace"` Pod string `json:"pod"` }
CapturedRequest contains request metadata captured from an echoserver response.
type CapturedResponse ¶
type CapturedResponse struct { StatusCode int ContentLength int64 Protocol string Headers map[string][]string }
CapturedResponse contains response metadata.
type DefaultRoundTripper ¶
type DefaultRoundTripper struct {
Debug bool
}
DefaultRoundTripper is the default implementation of a RoundTripper. It will be used if a custom implementation is not specified.
func (*DefaultRoundTripper) CaptureRoundTrip ¶
func (d *DefaultRoundTripper) CaptureRoundTrip(request Request) (*CapturedRequest, *CapturedResponse, error)
CaptureRoundTrip makes a request with the provided parameters and returns the captured request and response from echoserver. An error will be returned if there is an error running the function but not if an HTTP error status code is received.
type Request ¶
type Request struct { URL url.URL Host string Protocol string Method string Headers map[string][]string }
Request is the primary input for making a request.
type RoundTripper ¶
type RoundTripper interface {
CaptureRoundTrip(Request) (*CapturedRequest, *CapturedResponse, error)
}
RoundTripper is an interface used to make requests within conformance tests. This can be overridden with custom implementations whenever necessary.