Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
func NewInterceptor ¶
func NewInterceptor(core http.RoundTripper) *Interceptor
NewInterceptor constructs and returns the pointer to Interceptor. Interceptor is used to intercept every http client calls and store their responses into keploy context. The default mode of the pkg keploy context of the interceptor returned here is MODE_OFF.
func (Interceptor) RoundTrip ¶
RoundTrip is the custom method which is called before making http client calls to capture or replay the outputs of external http service.
func (*Interceptor) SetContext ¶
func (i *Interceptor) SetContext(requestContext context.Context)
SetContext is used to store the keploy context from request context into the Interceptor kctx field.
type ReadCloser ¶
type ReadCloser struct { *bytes.Reader Body io.ReadCloser }
ReadCloser is used so that gob could encode-decode http.Response.
func (ReadCloser) Close ¶
func (rc ReadCloser) Close() error
func (*ReadCloser) MarshalBinary ¶
func (rc *ReadCloser) MarshalBinary() ([]byte, error)
func (*ReadCloser) UnmarshalBinary ¶
func (rc *ReadCloser) UnmarshalBinary(b []byte) error
Click to show internal directories.
Click to hide internal directories.